-rw-r--r-- | libopie/pim/ocontact.cpp | 12 | ||||
-rw-r--r-- | libopie2/opiepim/ocontact.cpp | 12 |
2 files changed, 8 insertions, 16 deletions
diff --git a/libopie/pim/ocontact.cpp b/libopie/pim/ocontact.cpp index 0f05b65..fcf3b26 100644 --- a/libopie/pim/ocontact.cpp +++ b/libopie/pim/ocontact.cpp | |||
@@ -355,205 +355,201 @@ OContact::~OContact() | |||
355 | Returns the business phone number of the contact. | 355 | Returns the business phone number of the contact. |
356 | */ | 356 | */ |
357 | 357 | ||
358 | /*! \fn QString OContact::businessFax() const | 358 | /*! \fn QString OContact::businessFax() const |
359 | Returns the business fax number of the contact. | 359 | Returns the business fax number of the contact. |
360 | */ | 360 | */ |
361 | 361 | ||
362 | /*! \fn QString OContact::businessMobile() const | 362 | /*! \fn QString OContact::businessMobile() const |
363 | Returns the business mobile number of the contact. | 363 | Returns the business mobile number of the contact. |
364 | */ | 364 | */ |
365 | 365 | ||
366 | /*! \fn QString OContact::businessPager() const | 366 | /*! \fn QString OContact::businessPager() const |
367 | Returns the business pager number of the contact. | 367 | Returns the business pager number of the contact. |
368 | */ | 368 | */ |
369 | 369 | ||
370 | /*! \fn QString OContact::businessWebpage() const | 370 | /*! \fn QString OContact::businessWebpage() const |
371 | Returns the business webpage of the contact. | 371 | Returns the business webpage of the contact. |
372 | */ | 372 | */ |
373 | 373 | ||
374 | /*! \fn QString OContact::spouse() const | 374 | /*! \fn QString OContact::spouse() const |
375 | Returns the spouse of the contact. | 375 | Returns the spouse of the contact. |
376 | */ | 376 | */ |
377 | 377 | ||
378 | /*! \fn QString OContact::gender() const | 378 | /*! \fn QString OContact::gender() const |
379 | Returns the gender of the contact. | 379 | Returns the gender of the contact. |
380 | */ | 380 | */ |
381 | 381 | ||
382 | /*! \fn QString OContact::nickname() const | 382 | /*! \fn QString OContact::nickname() const |
383 | Returns the nickname of the contact. | 383 | Returns the nickname of the contact. |
384 | */ | 384 | */ |
385 | 385 | ||
386 | /*! \fn QString OContact::children() const | 386 | /*! \fn QString OContact::children() const |
387 | Returns the children of the contact. | 387 | Returns the children of the contact. |
388 | */ | 388 | */ |
389 | 389 | ||
390 | /*! \fn QString OContact::notes() const | 390 | /*! \fn QString OContact::notes() const |
391 | Returns the notes relating to the the contact. | 391 | Returns the notes relating to the the contact. |
392 | */ | 392 | */ |
393 | 393 | ||
394 | /*! \fn QString OContact::groups() const | 394 | /*! \fn QString OContact::groups() const |
395 | \internal | 395 | \internal |
396 | Returns the groups for the contact. | 396 | Returns the groups for the contact. |
397 | */ | 397 | */ |
398 | 398 | ||
399 | /*! \fn QStringList OContact::groupList() const | 399 | /*! \fn QStringList OContact::groupList() const |
400 | \internal | 400 | \internal |
401 | */ | 401 | */ |
402 | 402 | ||
403 | /*! \fn QString OContact::field(int) const | 403 | /*! \fn QString OContact::field(int) const |
404 | \internal | 404 | \internal |
405 | */ | 405 | */ |
406 | 406 | ||
407 | /*! \fn void OContact::saveJournal( journal_action, const QString & = QString::null ) | 407 | /*! \fn void OContact::saveJournal( journal_action, const QString & = QString::null ) |
408 | \internal | 408 | \internal |
409 | */ | 409 | */ |
410 | 410 | ||
411 | /*! \fn void OContact::setUid( int id ) | 411 | /*! \fn void OContact::setUid( int id ) |
412 | \internal | 412 | \internal |
413 | Sets the uid for this record to \a id. | 413 | Sets the uid for this record to \a id. |
414 | */ | 414 | */ |
415 | 415 | ||
416 | /*! \enum OContact::journal_action | 416 | /*! \enum OContact::journal_action |
417 | \internal | 417 | \internal |
418 | */ | 418 | */ |
419 | 419 | ||
420 | /*! | 420 | /*! |
421 | \internal | 421 | \internal |
422 | */ | 422 | */ |
423 | QMap<int, QString> OContact::toMap() const | 423 | QMap<int, QString> OContact::toMap() const |
424 | { | 424 | { |
425 | QMap<int, QString> map = mMap; | 425 | QMap<int, QString> map = mMap; |
426 | QString cats = idsToString( categories() ); | 426 | QString cats = idsToString( categories() ); |
427 | if ( !cats.isEmpty() ) | 427 | if ( !cats.isEmpty() ) |
428 | map.insert( Qtopia::AddressCategory, cats ); | 428 | map.insert( Qtopia::AddressCategory, cats ); |
429 | return map; | 429 | return map; |
430 | } | 430 | } |
431 | 431 | ||
432 | /*! | 432 | /*! |
433 | Returns a rich text formatted QString representing the contents the contact. | 433 | Returns a rich text formatted QString representing the contents the contact. |
434 | */ | 434 | */ |
435 | QString OContact::toRichText() const | 435 | QString OContact::toRichText() const |
436 | { | 436 | { |
437 | QString text; | 437 | QString text; |
438 | QString value, comp, state; | 438 | QString value, comp, state; |
439 | QString str; | 439 | QString str; |
440 | bool marker = false; | 440 | bool marker = false; |
441 | 441 | ||
442 | Config cfg("qpe"); | 442 | Config cfg("qpe"); |
443 | cfg.setGroup("Appearance"); | 443 | cfg.setGroup("Appearance"); |
444 | int addressformat = cfg.readNumEntry( "AddressFormat", Zip_City_State ); | 444 | int addressformat = cfg.readNumEntry( "AddressFormat", Zip_City_State ); |
445 | 445 | ||
446 | // name, jobtitle and company | 446 | // name, jobtitle and company |
447 | if ( !(value = fullName()).isEmpty() ) | 447 | if ( !(value = fullName()).isEmpty() ) |
448 | text += "<b><h3><img src=\"addressbook/AddressBook\"> " + Qtopia::escapeString(value) + "</h3></b>"; | 448 | text += "<b><h3><img src=\"addressbook/AddressBook\"> " + Qtopia::escapeString(value) + "</h3></b>"; |
449 | 449 | ||
450 | if ( !(value = jobTitle()).isEmpty() ) | 450 | if ( !(value = jobTitle()).isEmpty() ) |
451 | text += Qtopia::escapeString(value); | 451 | text += Qtopia::escapeString(value) + " "; |
452 | 452 | ||
453 | comp = company(); | 453 | comp = company(); |
454 | if ( !(value = department()).isEmpty() ) { | 454 | if ( !(value = department()).isEmpty() ) { |
455 | text += Qtopia::escapeString(value); | 455 | text += Qtopia::escapeString(value); |
456 | if ( comp ) | 456 | if ( comp ) |
457 | text += ", "; | 457 | text += ", " + Qtopia::escapeString(comp); |
458 | else | 458 | }else if ( comp ) |
459 | text += "<br>"; | 459 | text += "<br>" + Qtopia::escapeString(comp); |
460 | } | ||
461 | if ( !comp.isEmpty() ) | ||
462 | text += Qtopia::escapeString(comp); | ||
463 | |||
464 | text += "<br><hr>"; | 460 | text += "<br><hr>"; |
465 | 461 | ||
466 | // defailt email | 462 | // defailt email |
467 | QString defEmail = defaultEmail(); | 463 | QString defEmail = defaultEmail(); |
468 | if ( !defEmail.isEmpty() ){ | 464 | if ( !defEmail.isEmpty() ){ |
469 | text += "<b><img src=\"addressbook/email\"> " + QObject::tr("Default Email: ") + "</b>" | 465 | text += "<b><img src=\"addressbook/email\"> " + QObject::tr("Default Email: ") + "</b>" |
470 | + Qtopia::escapeString(defEmail); | 466 | + Qtopia::escapeString(defEmail); |
471 | marker = true; | 467 | marker = true; |
472 | } | 468 | } |
473 | 469 | ||
474 | // business address | 470 | // business address |
475 | if ( !businessStreet().isEmpty() || !businessCity().isEmpty() || | 471 | if ( !businessStreet().isEmpty() || !businessCity().isEmpty() || |
476 | !businessZip().isEmpty() || !businessCountry().isEmpty() ) { | 472 | !businessZip().isEmpty() || !businessCountry().isEmpty() ) { |
477 | text += QObject::tr( "<br><b>Work Address:</b>" ); | 473 | text += QObject::tr( "<br><b>Work Address:</b>" ); |
478 | marker = true; | 474 | marker = true; |
479 | } | 475 | } |
480 | 476 | ||
481 | if ( !(value = businessStreet()).isEmpty() ){ | 477 | if ( !(value = businessStreet()).isEmpty() ){ |
482 | text += "<br>" + Qtopia::escapeString(value); | 478 | text += "<br>" + Qtopia::escapeString(value); |
483 | marker = true; | 479 | marker = true; |
484 | } | 480 | } |
485 | 481 | ||
486 | switch( addressformat ){ | 482 | switch( addressformat ){ |
487 | case Zip_City_State:{ // Zip_Code City, State | 483 | case Zip_City_State:{ // Zip_Code City, State |
488 | state = businessState(); | 484 | state = businessState(); |
489 | if ( !(value = businessZip()).isEmpty() ){ | 485 | if ( !(value = businessZip()).isEmpty() ){ |
490 | text += "<br>" + Qtopia::escapeString(value) + " "; | 486 | text += "<br>" + Qtopia::escapeString(value) + " "; |
491 | marker = true; | 487 | marker = true; |
492 | 488 | ||
493 | } | 489 | } |
494 | if ( !(value = businessCity()).isEmpty() ) { | 490 | if ( !(value = businessCity()).isEmpty() ) { |
495 | marker = true; | 491 | marker = true; |
496 | if ( businessZip().isEmpty() && !businessStreet().isEmpty() ) | 492 | if ( businessZip().isEmpty() && !businessStreet().isEmpty() ) |
497 | text += "<br>"; | 493 | text += "<br>"; |
498 | text += Qtopia::escapeString(value); | 494 | text += Qtopia::escapeString(value); |
499 | if ( state ) | 495 | if ( state ) |
500 | text += ", " + Qtopia::escapeString(state); | 496 | text += ", " + Qtopia::escapeString(state); |
501 | } else if ( !state.isEmpty() ){ | 497 | } else if ( !state.isEmpty() ){ |
502 | text += "<br>" + Qtopia::escapeString(state); | 498 | text += "<br>" + Qtopia::escapeString(state); |
503 | marker = true; | 499 | marker = true; |
504 | } | 500 | } |
505 | break; | 501 | break; |
506 | } | 502 | } |
507 | case City_State_Zip:{ // City, State Zip_Code | 503 | case City_State_Zip:{ // City, State Zip_Code |
508 | state = businessState(); | 504 | state = businessState(); |
509 | if ( !(value = businessCity()).isEmpty() ) { | 505 | if ( !(value = businessCity()).isEmpty() ) { |
510 | marker = true; | 506 | marker = true; |
511 | text += "<br>" + Qtopia::escapeString(value); | 507 | text += "<br>" + Qtopia::escapeString(value); |
512 | if ( state ) | 508 | if ( state ) |
513 | text += ", " + Qtopia::escapeString(state); | 509 | text += ", " + Qtopia::escapeString(state); |
514 | } else if ( !state.isEmpty() ){ | 510 | } else if ( !state.isEmpty() ){ |
515 | text += "<br>" + Qtopia::escapeString(state); | 511 | text += "<br>" + Qtopia::escapeString(state); |
516 | marker = true; | 512 | marker = true; |
517 | } | 513 | } |
518 | if ( !(value = businessZip()).isEmpty() ){ | 514 | if ( !(value = businessZip()).isEmpty() ){ |
519 | text += " " + Qtopia::escapeString(value); | 515 | text += " " + Qtopia::escapeString(value); |
520 | marker = true; | 516 | marker = true; |
521 | } | 517 | } |
522 | break; | 518 | break; |
523 | } | 519 | } |
524 | } | 520 | } |
525 | 521 | ||
526 | if ( !(value = businessCountry()).isEmpty() ){ | 522 | if ( !(value = businessCountry()).isEmpty() ){ |
527 | text += "<br>" + Qtopia::escapeString(value); | 523 | text += "<br>" + Qtopia::escapeString(value); |
528 | marker = true; | 524 | marker = true; |
529 | } | 525 | } |
530 | 526 | ||
531 | // rest of Business data | 527 | // rest of Business data |
532 | str = office(); | 528 | str = office(); |
533 | if ( !str.isEmpty() ){ | 529 | if ( !str.isEmpty() ){ |
534 | text += "<br><b>" + QObject::tr("Office: ") + "</b>" | 530 | text += "<br><b>" + QObject::tr("Office: ") + "</b>" |
535 | + Qtopia::escapeString(str); | 531 | + Qtopia::escapeString(str); |
536 | marker = true; | 532 | marker = true; |
537 | } | 533 | } |
538 | str = businessWebpage(); | 534 | str = businessWebpage(); |
539 | if ( !str.isEmpty() ){ | 535 | if ( !str.isEmpty() ){ |
540 | text += "<br><b><img src=\"addressbook/webpagework\"> " + QObject::tr("Business Web Page: ") + "</b>" | 536 | text += "<br><b><img src=\"addressbook/webpagework\"> " + QObject::tr("Business Web Page: ") + "</b>" |
541 | + Qtopia::escapeString(str); | 537 | + Qtopia::escapeString(str); |
542 | marker = true; | 538 | marker = true; |
543 | } | 539 | } |
544 | str = businessPhone(); | 540 | str = businessPhone(); |
545 | if ( !str.isEmpty() ){ | 541 | if ( !str.isEmpty() ){ |
546 | text += "<br><b><img src=\"addressbook/phonework\"> " + QObject::tr("Business Phone: ") + "</b>" | 542 | text += "<br><b><img src=\"addressbook/phonework\"> " + QObject::tr("Business Phone: ") + "</b>" |
547 | + Qtopia::escapeString(str); | 543 | + Qtopia::escapeString(str); |
548 | marker = true; | 544 | marker = true; |
549 | } | 545 | } |
550 | str = businessFax(); | 546 | str = businessFax(); |
551 | if ( !str.isEmpty() ){ | 547 | if ( !str.isEmpty() ){ |
552 | text += "<br><b><img src=\"addressbook/faxwork\"> " + QObject::tr("Business Fax: ") + "</b>" | 548 | text += "<br><b><img src=\"addressbook/faxwork\"> " + QObject::tr("Business Fax: ") + "</b>" |
553 | + Qtopia::escapeString(str); | 549 | + Qtopia::escapeString(str); |
554 | marker = true; | 550 | marker = true; |
555 | } | 551 | } |
556 | str = businessMobile(); | 552 | str = businessMobile(); |
557 | if ( !str.isEmpty() ){ | 553 | if ( !str.isEmpty() ){ |
558 | text += "<br><b><img src=\"addressbook/mobilework\"> " + QObject::tr("Business Mobile: ") + "</b>" | 554 | text += "<br><b><img src=\"addressbook/mobilework\"> " + QObject::tr("Business Mobile: ") + "</b>" |
559 | + Qtopia::escapeString(str); | 555 | + Qtopia::escapeString(str); |
diff --git a/libopie2/opiepim/ocontact.cpp b/libopie2/opiepim/ocontact.cpp index 0f05b65..fcf3b26 100644 --- a/libopie2/opiepim/ocontact.cpp +++ b/libopie2/opiepim/ocontact.cpp | |||
@@ -355,205 +355,201 @@ OContact::~OContact() | |||
355 | Returns the business phone number of the contact. | 355 | Returns the business phone number of the contact. |
356 | */ | 356 | */ |
357 | 357 | ||
358 | /*! \fn QString OContact::businessFax() const | 358 | /*! \fn QString OContact::businessFax() const |
359 | Returns the business fax number of the contact. | 359 | Returns the business fax number of the contact. |
360 | */ | 360 | */ |
361 | 361 | ||
362 | /*! \fn QString OContact::businessMobile() const | 362 | /*! \fn QString OContact::businessMobile() const |
363 | Returns the business mobile number of the contact. | 363 | Returns the business mobile number of the contact. |
364 | */ | 364 | */ |
365 | 365 | ||
366 | /*! \fn QString OContact::businessPager() const | 366 | /*! \fn QString OContact::businessPager() const |
367 | Returns the business pager number of the contact. | 367 | Returns the business pager number of the contact. |
368 | */ | 368 | */ |
369 | 369 | ||
370 | /*! \fn QString OContact::businessWebpage() const | 370 | /*! \fn QString OContact::businessWebpage() const |
371 | Returns the business webpage of the contact. | 371 | Returns the business webpage of the contact. |
372 | */ | 372 | */ |
373 | 373 | ||
374 | /*! \fn QString OContact::spouse() const | 374 | /*! \fn QString OContact::spouse() const |
375 | Returns the spouse of the contact. | 375 | Returns the spouse of the contact. |
376 | */ | 376 | */ |
377 | 377 | ||
378 | /*! \fn QString OContact::gender() const | 378 | /*! \fn QString OContact::gender() const |
379 | Returns the gender of the contact. | 379 | Returns the gender of the contact. |
380 | */ | 380 | */ |
381 | 381 | ||
382 | /*! \fn QString OContact::nickname() const | 382 | /*! \fn QString OContact::nickname() const |
383 | Returns the nickname of the contact. | 383 | Returns the nickname of the contact. |
384 | */ | 384 | */ |
385 | 385 | ||
386 | /*! \fn QString OContact::children() const | 386 | /*! \fn QString OContact::children() const |
387 | Returns the children of the contact. | 387 | Returns the children of the contact. |
388 | */ | 388 | */ |
389 | 389 | ||
390 | /*! \fn QString OContact::notes() const | 390 | /*! \fn QString OContact::notes() const |
391 | Returns the notes relating to the the contact. | 391 | Returns the notes relating to the the contact. |
392 | */ | 392 | */ |
393 | 393 | ||
394 | /*! \fn QString OContact::groups() const | 394 | /*! \fn QString OContact::groups() const |
395 | \internal | 395 | \internal |
396 | Returns the groups for the contact. | 396 | Returns the groups for the contact. |
397 | */ | 397 | */ |
398 | 398 | ||
399 | /*! \fn QStringList OContact::groupList() const | 399 | /*! \fn QStringList OContact::groupList() const |
400 | \internal | 400 | \internal |
401 | */ | 401 | */ |
402 | 402 | ||
403 | /*! \fn QString OContact::field(int) const | 403 | /*! \fn QString OContact::field(int) const |
404 | \internal | 404 | \internal |
405 | */ | 405 | */ |
406 | 406 | ||
407 | /*! \fn void OContact::saveJournal( journal_action, const QString & = QString::null ) | 407 | /*! \fn void OContact::saveJournal( journal_action, const QString & = QString::null ) |
408 | \internal | 408 | \internal |
409 | */ | 409 | */ |
410 | 410 | ||
411 | /*! \fn void OContact::setUid( int id ) | 411 | /*! \fn void OContact::setUid( int id ) |
412 | \internal | 412 | \internal |
413 | Sets the uid for this record to \a id. | 413 | Sets the uid for this record to \a id. |
414 | */ | 414 | */ |
415 | 415 | ||
416 | /*! \enum OContact::journal_action | 416 | /*! \enum OContact::journal_action |
417 | \internal | 417 | \internal |
418 | */ | 418 | */ |
419 | 419 | ||
420 | /*! | 420 | /*! |
421 | \internal | 421 | \internal |
422 | */ | 422 | */ |
423 | QMap<int, QString> OContact::toMap() const | 423 | QMap<int, QString> OContact::toMap() const |
424 | { | 424 | { |
425 | QMap<int, QString> map = mMap; | 425 | QMap<int, QString> map = mMap; |
426 | QString cats = idsToString( categories() ); | 426 | QString cats = idsToString( categories() ); |
427 | if ( !cats.isEmpty() ) | 427 | if ( !cats.isEmpty() ) |
428 | map.insert( Qtopia::AddressCategory, cats ); | 428 | map.insert( Qtopia::AddressCategory, cats ); |
429 | return map; | 429 | return map; |
430 | } | 430 | } |
431 | 431 | ||
432 | /*! | 432 | /*! |
433 | Returns a rich text formatted QString representing the contents the contact. | 433 | Returns a rich text formatted QString representing the contents the contact. |
434 | */ | 434 | */ |
435 | QString OContact::toRichText() const | 435 | QString OContact::toRichText() const |
436 | { | 436 | { |
437 | QString text; | 437 | QString text; |
438 | QString value, comp, state; | 438 | QString value, comp, state; |
439 | QString str; | 439 | QString str; |
440 | bool marker = false; | 440 | bool marker = false; |
441 | 441 | ||
442 | Config cfg("qpe"); | 442 | Config cfg("qpe"); |
443 | cfg.setGroup("Appearance"); | 443 | cfg.setGroup("Appearance"); |
444 | int addressformat = cfg.readNumEntry( "AddressFormat", Zip_City_State ); | 444 | int addressformat = cfg.readNumEntry( "AddressFormat", Zip_City_State ); |
445 | 445 | ||
446 | // name, jobtitle and company | 446 | // name, jobtitle and company |
447 | if ( !(value = fullName()).isEmpty() ) | 447 | if ( !(value = fullName()).isEmpty() ) |
448 | text += "<b><h3><img src=\"addressbook/AddressBook\"> " + Qtopia::escapeString(value) + "</h3></b>"; | 448 | text += "<b><h3><img src=\"addressbook/AddressBook\"> " + Qtopia::escapeString(value) + "</h3></b>"; |
449 | 449 | ||
450 | if ( !(value = jobTitle()).isEmpty() ) | 450 | if ( !(value = jobTitle()).isEmpty() ) |
451 | text += Qtopia::escapeString(value); | 451 | text += Qtopia::escapeString(value) + " "; |
452 | 452 | ||
453 | comp = company(); | 453 | comp = company(); |
454 | if ( !(value = department()).isEmpty() ) { | 454 | if ( !(value = department()).isEmpty() ) { |
455 | text += Qtopia::escapeString(value); | 455 | text += Qtopia::escapeString(value); |
456 | if ( comp ) | 456 | if ( comp ) |
457 | text += ", "; | 457 | text += ", " + Qtopia::escapeString(comp); |
458 | else | 458 | }else if ( comp ) |
459 | text += "<br>"; | 459 | text += "<br>" + Qtopia::escapeString(comp); |
460 | } | ||
461 | if ( !comp.isEmpty() ) | ||
462 | text += Qtopia::escapeString(comp); | ||
463 | |||
464 | text += "<br><hr>"; | 460 | text += "<br><hr>"; |
465 | 461 | ||
466 | // defailt email | 462 | // defailt email |
467 | QString defEmail = defaultEmail(); | 463 | QString defEmail = defaultEmail(); |
468 | if ( !defEmail.isEmpty() ){ | 464 | if ( !defEmail.isEmpty() ){ |
469 | text += "<b><img src=\"addressbook/email\"> " + QObject::tr("Default Email: ") + "</b>" | 465 | text += "<b><img src=\"addressbook/email\"> " + QObject::tr("Default Email: ") + "</b>" |
470 | + Qtopia::escapeString(defEmail); | 466 | + Qtopia::escapeString(defEmail); |
471 | marker = true; | 467 | marker = true; |
472 | } | 468 | } |
473 | 469 | ||
474 | // business address | 470 | // business address |
475 | if ( !businessStreet().isEmpty() || !businessCity().isEmpty() || | 471 | if ( !businessStreet().isEmpty() || !businessCity().isEmpty() || |
476 | !businessZip().isEmpty() || !businessCountry().isEmpty() ) { | 472 | !businessZip().isEmpty() || !businessCountry().isEmpty() ) { |
477 | text += QObject::tr( "<br><b>Work Address:</b>" ); | 473 | text += QObject::tr( "<br><b>Work Address:</b>" ); |
478 | marker = true; | 474 | marker = true; |
479 | } | 475 | } |
480 | 476 | ||
481 | if ( !(value = businessStreet()).isEmpty() ){ | 477 | if ( !(value = businessStreet()).isEmpty() ){ |
482 | text += "<br>" + Qtopia::escapeString(value); | 478 | text += "<br>" + Qtopia::escapeString(value); |
483 | marker = true; | 479 | marker = true; |
484 | } | 480 | } |
485 | 481 | ||
486 | switch( addressformat ){ | 482 | switch( addressformat ){ |
487 | case Zip_City_State:{ // Zip_Code City, State | 483 | case Zip_City_State:{ // Zip_Code City, State |
488 | state = businessState(); | 484 | state = businessState(); |
489 | if ( !(value = businessZip()).isEmpty() ){ | 485 | if ( !(value = businessZip()).isEmpty() ){ |
490 | text += "<br>" + Qtopia::escapeString(value) + " "; | 486 | text += "<br>" + Qtopia::escapeString(value) + " "; |
491 | marker = true; | 487 | marker = true; |
492 | 488 | ||
493 | } | 489 | } |
494 | if ( !(value = businessCity()).isEmpty() ) { | 490 | if ( !(value = businessCity()).isEmpty() ) { |
495 | marker = true; | 491 | marker = true; |
496 | if ( businessZip().isEmpty() && !businessStreet().isEmpty() ) | 492 | if ( businessZip().isEmpty() && !businessStreet().isEmpty() ) |
497 | text += "<br>"; | 493 | text += "<br>"; |
498 | text += Qtopia::escapeString(value); | 494 | text += Qtopia::escapeString(value); |
499 | if ( state ) | 495 | if ( state ) |
500 | text += ", " + Qtopia::escapeString(state); | 496 | text += ", " + Qtopia::escapeString(state); |
501 | } else if ( !state.isEmpty() ){ | 497 | } else if ( !state.isEmpty() ){ |
502 | text += "<br>" + Qtopia::escapeString(state); | 498 | text += "<br>" + Qtopia::escapeString(state); |
503 | marker = true; | 499 | marker = true; |
504 | } | 500 | } |
505 | break; | 501 | break; |
506 | } | 502 | } |
507 | case City_State_Zip:{ // City, State Zip_Code | 503 | case City_State_Zip:{ // City, State Zip_Code |
508 | state = businessState(); | 504 | state = businessState(); |
509 | if ( !(value = businessCity()).isEmpty() ) { | 505 | if ( !(value = businessCity()).isEmpty() ) { |
510 | marker = true; | 506 | marker = true; |
511 | text += "<br>" + Qtopia::escapeString(value); | 507 | text += "<br>" + Qtopia::escapeString(value); |
512 | if ( state ) | 508 | if ( state ) |
513 | text += ", " + Qtopia::escapeString(state); | 509 | text += ", " + Qtopia::escapeString(state); |
514 | } else if ( !state.isEmpty() ){ | 510 | } else if ( !state.isEmpty() ){ |
515 | text += "<br>" + Qtopia::escapeString(state); | 511 | text += "<br>" + Qtopia::escapeString(state); |
516 | marker = true; | 512 | marker = true; |
517 | } | 513 | } |
518 | if ( !(value = businessZip()).isEmpty() ){ | 514 | if ( !(value = businessZip()).isEmpty() ){ |
519 | text += " " + Qtopia::escapeString(value); | 515 | text += " " + Qtopia::escapeString(value); |
520 | marker = true; | 516 | marker = true; |
521 | } | 517 | } |
522 | break; | 518 | break; |
523 | } | 519 | } |
524 | } | 520 | } |
525 | 521 | ||
526 | if ( !(value = businessCountry()).isEmpty() ){ | 522 | if ( !(value = businessCountry()).isEmpty() ){ |
527 | text += "<br>" + Qtopia::escapeString(value); | 523 | text += "<br>" + Qtopia::escapeString(value); |
528 | marker = true; | 524 | marker = true; |
529 | } | 525 | } |
530 | 526 | ||
531 | // rest of Business data | 527 | // rest of Business data |
532 | str = office(); | 528 | str = office(); |
533 | if ( !str.isEmpty() ){ | 529 | if ( !str.isEmpty() ){ |
534 | text += "<br><b>" + QObject::tr("Office: ") + "</b>" | 530 | text += "<br><b>" + QObject::tr("Office: ") + "</b>" |
535 | + Qtopia::escapeString(str); | 531 | + Qtopia::escapeString(str); |
536 | marker = true; | 532 | marker = true; |
537 | } | 533 | } |
538 | str = businessWebpage(); | 534 | str = businessWebpage(); |
539 | if ( !str.isEmpty() ){ | 535 | if ( !str.isEmpty() ){ |
540 | text += "<br><b><img src=\"addressbook/webpagework\"> " + QObject::tr("Business Web Page: ") + "</b>" | 536 | text += "<br><b><img src=\"addressbook/webpagework\"> " + QObject::tr("Business Web Page: ") + "</b>" |
541 | + Qtopia::escapeString(str); | 537 | + Qtopia::escapeString(str); |
542 | marker = true; | 538 | marker = true; |
543 | } | 539 | } |
544 | str = businessPhone(); | 540 | str = businessPhone(); |
545 | if ( !str.isEmpty() ){ | 541 | if ( !str.isEmpty() ){ |
546 | text += "<br><b><img src=\"addressbook/phonework\"> " + QObject::tr("Business Phone: ") + "</b>" | 542 | text += "<br><b><img src=\"addressbook/phonework\"> " + QObject::tr("Business Phone: ") + "</b>" |
547 | + Qtopia::escapeString(str); | 543 | + Qtopia::escapeString(str); |
548 | marker = true; | 544 | marker = true; |
549 | } | 545 | } |
550 | str = businessFax(); | 546 | str = businessFax(); |
551 | if ( !str.isEmpty() ){ | 547 | if ( !str.isEmpty() ){ |
552 | text += "<br><b><img src=\"addressbook/faxwork\"> " + QObject::tr("Business Fax: ") + "</b>" | 548 | text += "<br><b><img src=\"addressbook/faxwork\"> " + QObject::tr("Business Fax: ") + "</b>" |
553 | + Qtopia::escapeString(str); | 549 | + Qtopia::escapeString(str); |
554 | marker = true; | 550 | marker = true; |
555 | } | 551 | } |
556 | str = businessMobile(); | 552 | str = businessMobile(); |
557 | if ( !str.isEmpty() ){ | 553 | if ( !str.isEmpty() ){ |
558 | text += "<br><b><img src=\"addressbook/mobilework\"> " + QObject::tr("Business Mobile: ") + "</b>" | 554 | text += "<br><b><img src=\"addressbook/mobilework\"> " + QObject::tr("Business Mobile: ") + "</b>" |
559 | + Qtopia::escapeString(str); | 555 | + Qtopia::escapeString(str); |