summaryrefslogtreecommitdiffabout
path: root/kabc/addressee.h
Unidiff
Diffstat (limited to 'kabc/addressee.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressee.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/kabc/addressee.h b/kabc/addressee.h
index 0805458..bfb0840 100644
--- a/kabc/addressee.h
+++ b/kabc/addressee.h
@@ -445,396 +445,395 @@ class Addressee
445 static QString noteLabel(); 445 static QString noteLabel();
446 446
447 /** 447 /**
448 Set product identifier. 448 Set product identifier.
449 */ 449 */
450 void setProductId( const QString &productId ); 450 void setProductId( const QString &productId );
451 /** 451 /**
452 Return product identifier. 452 Return product identifier.
453 */ 453 */
454 QString productId() const; 454 QString productId() const;
455 /** 455 /**
456 Return translated label for productId field. 456 Return translated label for productId field.
457 */ 457 */
458 static QString productIdLabel(); 458 static QString productIdLabel();
459 459
460 /** 460 /**
461 Set revision date. 461 Set revision date.
462 */ 462 */
463 void setRevision( const QDateTime &revision ); 463 void setRevision( const QDateTime &revision );
464 /** 464 /**
465 Return revision date. 465 Return revision date.
466 */ 466 */
467 QDateTime revision() const; 467 QDateTime revision() const;
468 /** 468 /**
469 Return translated label for revision field. 469 Return translated label for revision field.
470 */ 470 */
471 static QString revisionLabel(); 471 static QString revisionLabel();
472 472
473 /** 473 /**
474 Set sort string. 474 Set sort string.
475 */ 475 */
476 void setSortString( const QString &sortString ); 476 void setSortString( const QString &sortString );
477 /** 477 /**
478 Return sort string. 478 Return sort string.
479 */ 479 */
480 QString sortString() const; 480 QString sortString() const;
481 /** 481 /**
482 Return translated label for sortString field. 482 Return translated label for sortString field.
483 */ 483 */
484 static QString sortStringLabel(); 484 static QString sortStringLabel();
485 485
486 /** 486 /**
487 Set URL. 487 Set URL.
488 */ 488 */
489 void setUrl( const KURL &url ); 489 void setUrl( const KURL &url );
490 /** 490 /**
491 Return URL. 491 Return URL.
492 */ 492 */
493 KURL url() const; 493 KURL url() const;
494 /** 494 /**
495 Return translated label for url field. 495 Return translated label for url field.
496 */ 496 */
497 static QString urlLabel(); 497 static QString urlLabel();
498 498
499 /** 499 /**
500 Set security class. 500 Set security class.
501 */ 501 */
502 void setSecrecy( const Secrecy &secrecy ); 502 void setSecrecy( const Secrecy &secrecy );
503 /** 503 /**
504 Return security class. 504 Return security class.
505 */ 505 */
506 Secrecy secrecy() const; 506 Secrecy secrecy() const;
507 /** 507 /**
508 Return translated label for secrecy field. 508 Return translated label for secrecy field.
509 */ 509 */
510 static QString secrecyLabel(); 510 static QString secrecyLabel();
511 511
512 /** 512 /**
513 Set logo. 513 Set logo.
514 */ 514 */
515 void setLogo( const Picture &logo ); 515 void setLogo( const Picture &logo );
516 /** 516 /**
517 Return logo. 517 Return logo.
518 */ 518 */
519 Picture logo() const; 519 Picture logo() const;
520 /** 520 /**
521 Return translated label for logo field. 521 Return translated label for logo field.
522 */ 522 */
523 static QString logoLabel(); 523 static QString logoLabel();
524 524
525 /** 525 /**
526 Set photo. 526 Set photo.
527 */ 527 */
528 void setPhoto( const Picture &photo ); 528 void setPhoto( const Picture &photo );
529 /** 529 /**
530 Return photo. 530 Return photo.
531 */ 531 */
532 Picture photo() const; 532 Picture photo() const;
533 /** 533 /**
534 Return translated label for photo field. 534 Return translated label for photo field.
535 */ 535 */
536 static QString photoLabel(); 536 static QString photoLabel();
537 537
538 /** 538 /**
539 Set sound. 539 Set sound.
540 */ 540 */
541 void setSound( const Sound &sound ); 541 void setSound( const Sound &sound );
542 /** 542 /**
543 Return sound. 543 Return sound.
544 */ 544 */
545 Sound sound() const; 545 Sound sound() const;
546 /** 546 /**
547 Return translated label for sound field. 547 Return translated label for sound field.
548 */ 548 */
549 static QString soundLabel(); 549 static QString soundLabel();
550 550
551 /** 551 /**
552 Set agent. 552 Set agent.
553 */ 553 */
554 void setAgent( const Agent &agent ); 554 void setAgent( const Agent &agent );
555 /** 555 /**
556 Return agent. 556 Return agent.
557 */ 557 */
558 Agent agent() const; 558 Agent agent() const;
559 /** 559 /**
560 Return translated label for agent field. 560 Return translated label for agent field.
561 */ 561 */
562 static QString agentLabel(); 562 static QString agentLabel();
563 563
564 /** 564 /**
565 Set name fields by parsing the given string and trying to associate the 565 Set name fields by parsing the given string and trying to associate the
566 parts of the string with according fields. This function should probably 566 parts of the string with according fields. This function should probably
567 be a bit more clever. 567 be a bit more clever.
568 */ 568 */
569 void setNameFromString( const QString & ); 569 void setNameFromString( const QString & );
570 570
571 /** 571 /**
572 Return the name of the addressee. This is calculated from all the name 572 Return the name of the addressee. This is calculated from all the name
573 fields. 573 fields.
574 */ 574 */
575 QString realName() const; 575 QString realName() const;
576 576
577 /** 577 /**
578 Return the name that consists of all name parts. 578 Return the name that consists of all name parts.
579 */ 579 */
580 QString assembledName() const; 580 QString assembledName() const;
581 581
582 /** 582 /**
583 Return email address including real name. 583 Return email address including real name.
584 584
585 @param email Email address to be used to construct the full email string. 585 @param email Email address to be used to construct the full email string.
586 If this is QString::null the preferred email address is used. 586 If this is QString::null the preferred email address is used.
587 */ 587 */
588 QString fullEmail( const QString &email=QString::null ) const; 588 QString fullEmail( const QString &email=QString::null ) const;
589 589
590 /** 590 /**
591 Insert an email address. If the email address already exists in this 591 Insert an email address. If the email address already exists in this
592 addressee it is not duplicated. 592 addressee it is not duplicated.
593 593
594 @param email Email address 594 @param email Email address
595 @param preferred Set to true, if this is the preferred email address of 595 @param preferred Set to true, if this is the preferred email address of
596 the addressee. 596 the addressee.
597 */ 597 */
598 void insertEmail( const QString &email, bool preferred=false ); 598 void insertEmail( const QString &email, bool preferred=false );
599 599
600 /** 600 /**
601 Remove email address. If the email address doesn't exist, nothing happens. 601 Remove email address. If the email address doesn't exist, nothing happens.
602 */ 602 */
603 void removeEmail( const QString &email ); 603 void removeEmail( const QString &email );
604 604
605 /** 605 /**
606 Return preferred email address. This is the first email address or the 606 Return preferred email address. This is the first email address or the
607 last one added with @ref insertEmail() with a set preferred parameter. 607 last one added with @ref insertEmail() with a set preferred parameter.
608 */ 608 */
609 QString preferredEmail() const; 609 QString preferredEmail() const;
610 610
611 /** 611 /**
612 Return list of all email addresses. 612 Return list of all email addresses.
613 */ 613 */
614 QStringList emails() const; 614 QStringList emails() const;
615 615
616 /** 616 /**
617 Set the emails to @param. 617 Set the emails to @param.
618 The first email address gets the preferred one! 618 The first email address gets the preferred one!
619 @param list The list of email addresses. 619 @param list The list of email addresses.
620 */ 620 */
621 void setEmails( const QStringList& list); 621 void setEmails( const QStringList& list);
622 622
623 /** 623 /**
624 Insert a phone number. If a phone number with the same id already exists 624 Insert a phone number. If a phone number with the same id already exists
625 in this addressee it is not duplicated. 625 in this addressee it is not duplicated.
626 */ 626 */
627 void insertPhoneNumber( const PhoneNumber &phoneNumber ); 627 void insertPhoneNumber( const PhoneNumber &phoneNumber );
628 628
629 /** 629 /**
630 Remove phone number. If no phone number with the given id exists for this 630 Remove phone number. If no phone number with the given id exists for this
631 addresse nothing happens. 631 addresse nothing happens.
632 */ 632 */
633 void removePhoneNumber( const PhoneNumber &phoneNumber ); 633 void removePhoneNumber( const PhoneNumber &phoneNumber );
634 634
635 /** 635 /**
636 Return phone number, which matches the given type. 636 Return phone number, which matches the given type.
637 */ 637 */
638 PhoneNumber phoneNumber( int type ) const; 638 PhoneNumber phoneNumber( int type ) const;
639 639
640 /** 640 /**
641 Return list of all phone numbers. 641 Return list of all phone numbers.
642 */ 642 */
643 PhoneNumber::List phoneNumbers() const; 643 PhoneNumber::List phoneNumbers() const;
644 644
645 /** 645 /**
646 Return list of phone numbers with a special type. 646 Return list of phone numbers with a special type.
647 */ 647 */
648 PhoneNumber::List phoneNumbers( int type ) const; 648 PhoneNumber::List phoneNumbers( int type ) const;
649 649
650 /** 650 /**
651 Return phone number with the given id. 651 Return phone number with the given id.
652 */ 652 */
653 PhoneNumber findPhoneNumber( const QString &id ) const; 653 PhoneNumber findPhoneNumber( const QString &id ) const;
654 654
655 /** 655 /**
656 Insert a key. If a key with the same id already exists 656 Insert a key. If a key with the same id already exists
657 in this addressee it is not duplicated. 657 in this addressee it is not duplicated.
658 */ 658 */
659 void insertKey( const Key &key ); 659 void insertKey( const Key &key );
660 660
661 /** 661 /**
662 Remove a key. If no key with the given id exists for this 662 Remove a key. If no key with the given id exists for this
663 addresse nothing happens. 663 addresse nothing happens.
664 */ 664 */
665 void removeKey( const Key &key ); 665 void removeKey( const Key &key );
666 666
667 /** 667 /**
668 Return key, which matches the given type. 668 Return key, which matches the given type.
669 If @p type == Key::Custom you can specify a string 669 If @p type == Key::Custom you can specify a string
670 that should match. If you leave the string empty, the first 670 that should match. If you leave the string empty, the first
671 key with a custom value is returned. 671 key with a custom value is returned.
672 */ 672 */
673 Key key( int type, QString customTypeString = QString::null ) const; 673 Key key( int type, QString customTypeString = QString::null ) const;
674 674
675 /** 675 /**
676 Return list of all keys. 676 Return list of all keys.
677 */ 677 */
678 Key::List keys() const; 678 Key::List keys() const;
679 679
680 /** 680 /**
681 Set the list of keys 681 Set the list of keys
682 @param keys The keys to be set. 682 @param keys The keys to be set.
683 */ 683 */
684 void setKeys( const Key::List& keys); 684 void setKeys( const Key::List& keys);
685 685
686 /** 686 /**
687 Return list of keys with a special type. 687 Return list of keys with a special type.
688 If @p type == Key::Custom you can specify a string 688 If @p type == Key::Custom you can specify a string
689 that should match. If you leave the string empty, all custom 689 that should match. If you leave the string empty, all custom
690 keys will be returned. 690 keys will be returned.
691 */ 691 */
692 Key::List keys( int type, QString customTypeString = QString::null ) const; 692 Key::List keys( int type, QString customTypeString = QString::null ) const;
693 693
694 /** 694 /**
695 Return key with the given id. 695 Return key with the given id.
696 */ 696 */
697 Key findKey( const QString &id ) const; 697 Key findKey( const QString &id ) const;
698 698
699 /** 699 /**
700 Insert an address. If an address with the same id already exists 700 Insert an address. If an address with the same id already exists
701 in this addressee it is not duplicated. 701 in this addressee it is not duplicated.
702 */ 702 */
703 void insertAddress( const Address &address ); 703 void insertAddress( const Address &address );
704 704
705 /** 705 /**
706 Remove address. If no address with the given id exists for this 706 Remove address. If no address with the given id exists for this
707 addresse nothing happens. 707 addresse nothing happens.
708 */ 708 */
709 void removeAddress( const Address &address ); 709 void removeAddress( const Address &address );
710 710
711 /** 711 /**
712 Return address, which matches the given type. 712 Return address, which matches the given type.
713 */ 713 */
714 Address address( int type ) const; 714 Address address( int type ) const;
715 715
716 /** 716 /**
717 Return list of all addresses. 717 Return list of all addresses.
718 */ 718 */
719 Address::List addresses() const; 719 Address::List addresses() const;
720 720
721 /** 721 /**
722 Return list of addresses with a special type. 722 Return list of addresses with a special type.
723 */ 723 */
724 Address::List addresses( int type ) const; 724 Address::List addresses( int type ) const;
725 725
726 /** 726 /**
727 Return address with the given id. 727 Return address with the given id.
728 */ 728 */
729 Address findAddress( const QString &id ) const; 729 Address findAddress( const QString &id ) const;
730 730
731 /** 731 /**
732 Insert category. If the category already exists it is not duplicated. 732 Insert category. If the category already exists it is not duplicated.
733 */ 733 */
734 void insertCategory( const QString & ); 734 void insertCategory( const QString & );
735 735
736 /** 736 /**
737 Remove category. 737 Remove category.
738 */ 738 */
739 void removeCategory( const QString & ); 739 void removeCategory( const QString & );
740 740
741 /** 741 /**
742 Return, if addressee has the given category. 742 Return, if addressee has the given category.
743 */ 743 */
744 bool hasCategory( const QString & ) const; 744 bool hasCategory( const QString & ) const;
745 745
746 /** 746 /**
747 Set categories to given value. 747 Set categories to given value.
748 */ 748 */
749 void setCategories( const QStringList & ); 749 void setCategories( const QStringList & );
750 750
751 /** 751 /**
752 Return list of all set categories. 752 Return list of all set categories.
753 */ 753 */
754 QStringList categories() const; 754 QStringList categories() const;
755 755
756 /** 756 /**
757 Insert custom entry. The entry is identified by the name of the inserting 757 Insert custom entry. The entry is identified by the name of the inserting
758 application and a unique name. If an entry with the given app and name 758 application and a unique name. If an entry with the given app and name
759 already exists its value is replaced with the new given value. 759 already exists its value is replaced with the new given value.
760 */ 760 */
761 void insertCustom( const QString &app, const QString &name, 761 void insertCustom( const QString &app, const QString &name,
762 const QString &value ); 762 const QString &value );
763 763
764 /** 764 /**
765 Remove custom entry. 765 Remove custom entry.
766 */ 766 */
767 void removeCustom( const QString &app, const QString &name ); 767 void removeCustom( const QString &app, const QString &name );
768 768
769 /** 769 /**
770 Return value of custom entry, identified by app and entry name. 770 Return value of custom entry, identified by app and entry name.
771 */ 771 */
772 QString custom( const QString &app, const QString &name ) const; 772 QString custom( const QString &app, const QString &name ) const;
773 773
774 /** 774 /**
775 Set all custom entries. 775 Set all custom entries.
776 */ 776 */
777 void setCustoms( const QStringList & ); 777 void setCustoms( const QStringList & );
778 778
779 /** 779 /**
780 Return list of all custom entries. 780 Return list of all custom entries.
781 */ 781 */
782 QStringList customs() const; 782 QStringList customs() const;
783 783
784 /** 784 /**
785 Parse full email address. The result is given back in fullName and email. 785 Parse full email address. The result is given back in fullName and email.
786 */ 786 */
787 static void parseEmailAddress( const QString &rawEmail, QString &fullName, 787 static void parseEmailAddress( const QString &rawEmail, QString &fullName,
788 QString &email ); 788 QString &email );
789 789
790 /** 790 /**
791 Debug output. 791 Debug output.
792 */ 792 */
793 void dump() const; 793 void dump() const;
794 794
795 /** 795 /**
796 Returns string representation of the addressee. 796 Returns string representation of the addressee.
797 */ 797 */
798 QString asString() const; 798 QString asString() const;
799 799
800 /** 800 /**
801 Set resource where the addressee is from. 801 Set resource where the addressee is from.
802 */ 802 */
803 void setResource( Resource *resource ); 803 void setResource( Resource *resource );
804 804
805 /** 805 /**
806 Return pointer to resource. 806 Return pointer to resource.
807 */ 807 */
808 Resource *resource() const; 808 Resource *resource() const;
809 809
810 /** 810 /**
811 Return resourcelabel. 811 Return resourcelabel.
812 */ 812 */
813 //US 813 //US
814 static QString resourceLabel(); 814 static QString resourceLabel();
815 815
816 /** 816 /**
817 Mark addressee as changed. 817 Mark addressee as changed.
818 */ 818 */
819 void setChanged( bool value ); 819 void setChanged( bool value );
820 820
821 /** 821 /**
822 Return whether the addressee is changed. 822 Return whether the addressee is changed.
823 */ 823 */
824 bool changed() const; 824 bool changed() const;
825 825
826 private: 826 private:
827 Addressee copy(); 827 Addressee copy();
828 void detach(); 828 void detach();
829 int mTempSyncStat;
830 829
831 struct AddresseeData; 830 struct AddresseeData;
832 mutable KSharedPtr<AddresseeData> mData; 831 mutable KSharedPtr<AddresseeData> mData;
833}; 832};
834 833
835QDataStream &operator<<( QDataStream &, const Addressee & ); 834QDataStream &operator<<( QDataStream &, const Addressee & );
836QDataStream &operator>>( QDataStream &, Addressee & ); 835QDataStream &operator>>( QDataStream &, Addressee & );
837 836
838} 837}
839 838
840#endif 839#endif