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