-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 8 | ||||
-rw-r--r-- | core/pim/addressbook/addressbook.h | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index 055124c..60db2b4 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp | |||
@@ -654,297 +654,301 @@ void AddressbookWindow::editEntry( EntryMode entryMode ) | |||
654 | else if ( entryMode == NewEntry ) | 654 | else if ( entryMode == NewEntry ) |
655 | abEditor->setEntry( entry ); | 655 | abEditor->setEntry( entry ); |
656 | // other things may change the caption. | 656 | // other things may change the caption. |
657 | abEditor->setCaption( tr("Edit Address") ); | 657 | abEditor->setCaption( tr("Edit Address") ); |
658 | 658 | ||
659 | #if defined(Q_WS_QWS) || defined(_WS_QWS_) | 659 | #if defined(Q_WS_QWS) || defined(_WS_QWS_) |
660 | abEditor->showMaximized(); | 660 | abEditor->showMaximized(); |
661 | #endif | 661 | #endif |
662 | // fix the foxus... | 662 | // fix the foxus... |
663 | abEditor->setNameFocus(); | 663 | abEditor->setNameFocus(); |
664 | if ( abEditor->exec() ) { | 664 | if ( abEditor->exec() ) { |
665 | setFocus(); | 665 | setFocus(); |
666 | if ( entryMode == NewEntry ) { | 666 | if ( entryMode == NewEntry ) { |
667 | OContact insertEntry = abEditor->entry(); | 667 | OContact insertEntry = abEditor->entry(); |
668 | insertEntry.assignUid(); | 668 | insertEntry.assignUid(); |
669 | m_abView -> addEntry( insertEntry ); | 669 | m_abView -> addEntry( insertEntry ); |
670 | } else { | 670 | } else { |
671 | OContact replEntry = abEditor->entry(); | 671 | OContact replEntry = abEditor->entry(); |
672 | 672 | ||
673 | if ( !replEntry.isValidUid() ) | 673 | if ( !replEntry.isValidUid() ) |
674 | replEntry.assignUid(); | 674 | replEntry.assignUid(); |
675 | 675 | ||
676 | m_abView -> replaceEntry( replEntry ); | 676 | m_abView -> replaceEntry( replEntry ); |
677 | } | 677 | } |
678 | } | 678 | } |
679 | // populateCategories(); | 679 | // populateCategories(); |
680 | 680 | ||
681 | } | 681 | } |
682 | 682 | ||
683 | void AddressbookWindow::editPersonal() | 683 | void AddressbookWindow::editPersonal() |
684 | { | 684 | { |
685 | OContact entry; | 685 | OContact entry; |
686 | if ( !abEditor ) { | 686 | if ( !abEditor ) { |
687 | abEditor = new ContactEditor( entry, this, "editor" ); | 687 | abEditor = new ContactEditor( entry, this, "editor" ); |
688 | } | 688 | } |
689 | 689 | ||
690 | abEditor->setCaption(tr("Edit My Personal Details")); | 690 | abEditor->setCaption(tr("Edit My Personal Details")); |
691 | abEditor->setPersonalView( true ); | 691 | abEditor->setPersonalView( true ); |
692 | editEntry( EditEntry ); | 692 | editEntry( EditEntry ); |
693 | abEditor->setPersonalView( false ); | 693 | abEditor->setPersonalView( false ); |
694 | 694 | ||
695 | } | 695 | } |
696 | 696 | ||
697 | 697 | ||
698 | void AddressbookWindow::slotPersonalView() | 698 | void AddressbookWindow::slotPersonalView() |
699 | { | 699 | { |
700 | if (!actionPersonal->isOn()) { | 700 | if (!actionPersonal->isOn()) { |
701 | // we just turned it off | 701 | // we just turned it off |
702 | setCaption( tr("Contacts") ); | 702 | setCaption( tr("Contacts") ); |
703 | actionNew->setEnabled(TRUE); | 703 | actionNew->setEnabled(TRUE); |
704 | actionTrash->setEnabled(TRUE); | 704 | actionTrash->setEnabled(TRUE); |
705 | actionFind->setEnabled(TRUE); | 705 | actionFind->setEnabled(TRUE); |
706 | actionMail->setEnabled(TRUE); | 706 | actionMail->setEnabled(TRUE); |
707 | // slotUpdateToolbar(); | 707 | // slotUpdateToolbar(); |
708 | 708 | ||
709 | m_abView->showPersonal( false ); | 709 | m_abView->showPersonal( false ); |
710 | 710 | ||
711 | return; | 711 | return; |
712 | } | 712 | } |
713 | 713 | ||
714 | // XXX need to disable some QActions. | 714 | // XXX need to disable some QActions. |
715 | actionNew->setEnabled(FALSE); | 715 | actionNew->setEnabled(FALSE); |
716 | actionTrash->setEnabled(FALSE); | 716 | actionTrash->setEnabled(FALSE); |
717 | actionFind->setEnabled(FALSE); | 717 | actionFind->setEnabled(FALSE); |
718 | actionMail->setEnabled(FALSE); | 718 | actionMail->setEnabled(FALSE); |
719 | 719 | ||
720 | setCaption( tr("Contacts - My Personal Details") ); | 720 | setCaption( tr("Contacts - My Personal Details") ); |
721 | 721 | ||
722 | m_abView->showPersonal( true ); | 722 | m_abView->showPersonal( true ); |
723 | 723 | ||
724 | } | 724 | } |
725 | 725 | ||
726 | 726 | ||
727 | void AddressbookWindow::listIsEmpty( bool empty ) | 727 | void AddressbookWindow::listIsEmpty( bool empty ) |
728 | { | 728 | { |
729 | if ( !empty ) { | 729 | if ( !empty ) { |
730 | deleteButton->setEnabled( TRUE ); | 730 | deleteButton->setEnabled( TRUE ); |
731 | } | 731 | } |
732 | } | 732 | } |
733 | 733 | ||
734 | void AddressbookWindow::reload() | 734 | void AddressbookWindow::reload() |
735 | { | 735 | { |
736 | syncing = FALSE; | 736 | syncing = FALSE; |
737 | m_abView->clear(); | 737 | m_abView->clear(); |
738 | m_abView->reload(); | 738 | m_abView->reload(); |
739 | } | 739 | } |
740 | 740 | ||
741 | void AddressbookWindow::flush() | 741 | void AddressbookWindow::flush() |
742 | { | 742 | { |
743 | syncing = TRUE; | 743 | syncing = TRUE; |
744 | m_abView->save(); | 744 | m_abView->save(); |
745 | } | 745 | } |
746 | 746 | ||
747 | 747 | ||
748 | void AddressbookWindow::closeEvent( QCloseEvent *e ) | 748 | void AddressbookWindow::closeEvent( QCloseEvent *e ) |
749 | { | 749 | { |
750 | 750 | if(active_view == AbView::CardView){ | |
751 | slotViewSwitched( AbView::TableView ); | ||
752 | e->ignore(); | ||
753 | return; | ||
754 | } | ||
751 | if(syncing) { | 755 | if(syncing) { |
752 | /* shouldn't we save, I hear you say? well its already been set | 756 | /* shouldn't we save, I hear you say? well its already been set |
753 | so that an edit can not occur during a sync, and we flushed | 757 | so that an edit can not occur during a sync, and we flushed |
754 | at the start of the sync, so there is no need to save | 758 | at the start of the sync, so there is no need to save |
755 | Saving however itself would cause problems. */ | 759 | Saving however itself would cause problems. */ |
756 | e->accept(); | 760 | e->accept(); |
757 | return; | 761 | return; |
758 | } | 762 | } |
759 | //################## shouldn't always save | 763 | //################## shouldn't always save |
760 | // True, but the database handles this automatically ! (se) | 764 | // True, but the database handles this automatically ! (se) |
761 | if ( save() ) | 765 | if ( save() ) |
762 | e->accept(); | 766 | e->accept(); |
763 | else | 767 | else |
764 | e->ignore(); | 768 | e->ignore(); |
765 | } | 769 | } |
766 | 770 | ||
767 | /* | 771 | /* |
768 | Returns TRUE if it is OK to exit | 772 | Returns TRUE if it is OK to exit |
769 | */ | 773 | */ |
770 | 774 | ||
771 | bool AddressbookWindow::save() | 775 | bool AddressbookWindow::save() |
772 | { | 776 | { |
773 | if ( !m_abView->save() ) { | 777 | if ( !m_abView->save() ) { |
774 | if ( QMessageBox::critical( 0, tr( "Out of space" ), | 778 | if ( QMessageBox::critical( 0, tr( "Out of space" ), |
775 | tr("Unable to save information.\n" | 779 | tr("Unable to save information.\n" |
776 | "Free up some space\n" | 780 | "Free up some space\n" |
777 | "and try again.\n" | 781 | "and try again.\n" |
778 | "\nQuit anyway?"), | 782 | "\nQuit anyway?"), |
779 | QMessageBox::Yes|QMessageBox::Escape, | 783 | QMessageBox::Yes|QMessageBox::Escape, |
780 | QMessageBox::No|QMessageBox::Default ) | 784 | QMessageBox::No|QMessageBox::Default ) |
781 | != QMessageBox::No ) | 785 | != QMessageBox::No ) |
782 | return TRUE; | 786 | return TRUE; |
783 | else | 787 | else |
784 | return FALSE; | 788 | return FALSE; |
785 | } | 789 | } |
786 | return TRUE; | 790 | return TRUE; |
787 | } | 791 | } |
788 | 792 | ||
789 | #ifdef __DEBUG_RELEASE | 793 | #ifdef __DEBUG_RELEASE |
790 | void AddressbookWindow::slotSave() | 794 | void AddressbookWindow::slotSave() |
791 | { | 795 | { |
792 | save(); | 796 | save(); |
793 | } | 797 | } |
794 | #endif | 798 | #endif |
795 | 799 | ||
796 | 800 | ||
797 | void AddressbookWindow::slotNotFound() | 801 | void AddressbookWindow::slotNotFound() |
798 | { | 802 | { |
799 | qWarning("Got notfound signal !"); | 803 | qWarning("Got notfound signal !"); |
800 | QMessageBox::information( this, tr( "Not Found" ), | 804 | QMessageBox::information( this, tr( "Not Found" ), |
801 | tr( "Unable to find a contact for this \n search pattern!" ) ); | 805 | tr( "Unable to find a contact for this \n search pattern!" ) ); |
802 | 806 | ||
803 | 807 | ||
804 | } | 808 | } |
805 | void AddressbookWindow::slotWrapAround() | 809 | void AddressbookWindow::slotWrapAround() |
806 | { | 810 | { |
807 | qWarning("Got wrap signal !"); | 811 | qWarning("Got wrap signal !"); |
808 | // if ( doNotifyWrapAround ) | 812 | // if ( doNotifyWrapAround ) |
809 | // QMessageBox::information( this, tr( "End of list" ), | 813 | // QMessageBox::information( this, tr( "End of list" ), |
810 | // tr( "End of list. Wrap around now...!" ) + "\n" ); | 814 | // tr( "End of list. Wrap around now...!" ) + "\n" ); |
811 | 815 | ||
812 | } | 816 | } |
813 | 817 | ||
814 | void AddressbookWindow::slotSetCategory( int c ) | 818 | void AddressbookWindow::slotSetCategory( int c ) |
815 | { | 819 | { |
816 | qWarning( "void AddressbookWindow::slotSetCategory( %d ) from %d", c, catMenu->count() ); | 820 | qWarning( "void AddressbookWindow::slotSetCategory( %d ) from %d", c, catMenu->count() ); |
817 | 821 | ||
818 | QString cat, book; | 822 | QString cat, book; |
819 | AbView::Views view = AbView::TableView; | 823 | AbView::Views view = AbView::TableView; |
820 | 824 | ||
821 | if ( c <= 0 ) | 825 | if ( c <= 0 ) |
822 | return; | 826 | return; |
823 | 827 | ||
824 | // Switch view | 828 | // Switch view |
825 | if ( c < 3 ) | 829 | if ( c < 3 ) |
826 | for ( unsigned int i = 1; i < 3; i++ ){ | 830 | for ( unsigned int i = 1; i < 3; i++ ){ |
827 | if ( catMenu ) | 831 | if ( catMenu ) |
828 | catMenu->setItemChecked( i, c == (int)i ); | 832 | catMenu->setItemChecked( i, c == (int)i ); |
829 | } | 833 | } |
830 | else | 834 | else |
831 | // Checkmark Category Menu Item Selected | 835 | // Checkmark Category Menu Item Selected |
832 | for ( unsigned int i = 3; i < catMenu->count(); i++ ) | 836 | for ( unsigned int i = 3; i < catMenu->count(); i++ ) |
833 | catMenu->setItemChecked( i, c == (int)i ); | 837 | catMenu->setItemChecked( i, c == (int)i ); |
834 | 838 | ||
835 | // Now switch to the selected category | 839 | // Now switch to the selected category |
836 | for ( unsigned int i = 1; i < catMenu->count(); i++ ) { | 840 | for ( unsigned int i = 1; i < catMenu->count(); i++ ) { |
837 | if (catMenu->isItemChecked( i )) { | 841 | if (catMenu->isItemChecked( i )) { |
838 | if ( i == 1 ){ // default List view | 842 | if ( i == 1 ){ // default List view |
839 | book = QString::null; | 843 | book = QString::null; |
840 | view = AbView::TableView; | 844 | view = AbView::TableView; |
841 | }else if ( i == 2 ){ | 845 | }else if ( i == 2 ){ |
842 | book = tr( "Cards" ); | 846 | book = tr( "Cards" ); |
843 | view = AbView::CardView; | 847 | view = AbView::CardView; |
844 | // }else if ( i == 3 ){ | 848 | // }else if ( i == 3 ){ |
845 | // book = tr( "Personal" ); | 849 | // book = tr( "Personal" ); |
846 | // view = AbView:: PersonalView; | 850 | // view = AbView:: PersonalView; |
847 | }else if ( i == 3 ){ // default All Categories | 851 | }else if ( i == 3 ){ // default All Categories |
848 | cat = QString::null; | 852 | cat = QString::null; |
849 | }else if ( i == (unsigned int)catMenu->count() - 1 ){ // last menu option (seperator is counted, too) will be Unfiled | 853 | }else if ( i == (unsigned int)catMenu->count() - 1 ){ // last menu option (seperator is counted, too) will be Unfiled |
850 | cat = "Unfiled"; | 854 | cat = "Unfiled"; |
851 | qWarning ("Unfiled selected!!!"); | 855 | qWarning ("Unfiled selected!!!"); |
852 | }else{ | 856 | }else{ |
853 | cat = m_abView->categories()[i - 4]; | 857 | cat = m_abView->categories()[i - 4]; |
854 | } | 858 | } |
855 | } | 859 | } |
856 | } | 860 | } |
857 | 861 | ||
858 | // Switch to the selected View | 862 | // Switch to the selected View |
859 | slotViewSwitched( view ); | 863 | slotViewSwitched( view ); |
860 | 864 | ||
861 | // Tell the view about the selected category | 865 | // Tell the view about the selected category |
862 | m_abView -> setShowByCategory( cat ); | 866 | m_abView -> setShowByCategory( cat ); |
863 | 867 | ||
864 | if ( book.isEmpty() ) | 868 | if ( book.isEmpty() ) |
865 | book = "List"; | 869 | book = "List"; |
866 | if ( cat.isEmpty() ) | 870 | if ( cat.isEmpty() ) |
867 | cat = "All"; | 871 | cat = "All"; |
868 | 872 | ||
869 | setCaption( tr( "Contacts" ) + " - " + book + " - " + tr( cat ) ); | 873 | setCaption( tr( "Contacts" ) + " - " + book + " - " + tr( cat ) ); |
870 | } | 874 | } |
871 | 875 | ||
872 | void AddressbookWindow::slotViewSwitched( int view ) | 876 | void AddressbookWindow::slotViewSwitched( int view ) |
873 | { | 877 | { |
874 | qWarning( "void AddressbookWindow::slotViewSwitched( %d )", view ); | 878 | qWarning( "void AddressbookWindow::slotViewSwitched( %d )", view ); |
875 | int menu = 0; | 879 | int menu = 0; |
876 | 880 | ||
877 | // Switch to selected view | 881 | // Switch to selected view |
878 | switch ( view ){ | 882 | switch ( view ){ |
879 | case AbView::TableView: | 883 | case AbView::TableView: |
880 | menu = 1; | 884 | menu = 1; |
881 | m_tableViewButton->setOn(true); | 885 | m_tableViewButton->setOn(true); |
882 | m_cardViewButton->setOn(false); | 886 | m_cardViewButton->setOn(false); |
883 | break; | 887 | break; |
884 | case AbView::CardView: | 888 | case AbView::CardView: |
885 | menu = 2; | 889 | menu = 2; |
886 | m_tableViewButton->setOn(false); | 890 | m_tableViewButton->setOn(false); |
887 | m_cardViewButton->setOn(true); | 891 | m_cardViewButton->setOn(true); |
888 | break; | 892 | break; |
889 | } | 893 | } |
890 | for ( unsigned int i = 1; i < 3; i++ ){ | 894 | for ( unsigned int i = 1; i < 3; i++ ){ |
891 | if ( catMenu ) | 895 | if ( catMenu ) |
892 | catMenu->setItemChecked( i, menu == (int)i ); | 896 | catMenu->setItemChecked( i, menu == (int)i ); |
893 | } | 897 | } |
894 | 898 | ||
895 | // Tell the view about the selected view | 899 | // Tell the view about the selected view |
896 | m_abView -> setShowToView ( (AbView::Views) view ); | 900 | m_abView -> setShowToView ( (AbView::Views) view ); |
897 | 901 | active_view = view; | |
898 | } | 902 | } |
899 | 903 | ||
900 | 904 | ||
901 | void AddressbookWindow::slotListView() | 905 | void AddressbookWindow::slotListView() |
902 | { | 906 | { |
903 | slotViewSwitched( AbView::TableView ); | 907 | slotViewSwitched( AbView::TableView ); |
904 | } | 908 | } |
905 | 909 | ||
906 | void AddressbookWindow::slotCardView() | 910 | void AddressbookWindow::slotCardView() |
907 | { | 911 | { |
908 | slotViewSwitched( AbView::CardView ); | 912 | slotViewSwitched( AbView::CardView ); |
909 | } | 913 | } |
910 | 914 | ||
911 | void AddressbookWindow::slotSetLetter( char c ) { | 915 | void AddressbookWindow::slotSetLetter( char c ) { |
912 | 916 | ||
913 | m_abView->setShowByLetter( c ); | 917 | m_abView->setShowByLetter( c ); |
914 | 918 | ||
915 | } | 919 | } |
916 | 920 | ||
917 | 921 | ||
918 | void AddressbookWindow::populateCategories() | 922 | void AddressbookWindow::populateCategories() |
919 | { | 923 | { |
920 | catMenu->clear(); | 924 | catMenu->clear(); |
921 | 925 | ||
922 | int id, rememberId; | 926 | int id, rememberId; |
923 | id = 1; | 927 | id = 1; |
924 | rememberId = 0; | 928 | rememberId = 0; |
925 | 929 | ||
926 | catMenu->insertItem( Resource::loadPixmap( "datebook/weeklst" ), tr( "List" ), id++ ); | 930 | catMenu->insertItem( Resource::loadPixmap( "datebook/weeklst" ), tr( "List" ), id++ ); |
927 | catMenu->insertItem( Resource::loadPixmap( "day" ), tr( "Cards" ), id++ ); | 931 | catMenu->insertItem( Resource::loadPixmap( "day" ), tr( "Cards" ), id++ ); |
928 | // catMenu->insertItem( tr( "Personal" ), id++ ); | 932 | // catMenu->insertItem( tr( "Personal" ), id++ ); |
929 | catMenu->insertSeparator(); | 933 | catMenu->insertSeparator(); |
930 | 934 | ||
931 | catMenu->insertItem( tr( "All" ), id++ ); | 935 | catMenu->insertItem( tr( "All" ), id++ ); |
932 | QStringList categories = m_abView->categories(); | 936 | QStringList categories = m_abView->categories(); |
933 | categories.append( tr( "Unfiled" ) ); | 937 | categories.append( tr( "Unfiled" ) ); |
934 | for ( QStringList::Iterator it = categories.begin(); | 938 | for ( QStringList::Iterator it = categories.begin(); |
935 | it != categories.end(); ++it ) { | 939 | it != categories.end(); ++it ) { |
936 | catMenu->insertItem( *it, id ); | 940 | catMenu->insertItem( *it, id ); |
937 | if ( *it == m_abView -> showCategory() ) | 941 | if ( *it == m_abView -> showCategory() ) |
938 | rememberId = id; | 942 | rememberId = id; |
939 | ++id; | 943 | ++id; |
940 | } | 944 | } |
941 | 945 | ||
942 | 946 | ||
943 | if ( m_abView -> showCategory().isEmpty() ) { | 947 | if ( m_abView -> showCategory().isEmpty() ) { |
944 | slotSetCategory( 3 ); | 948 | slotSetCategory( 3 ); |
945 | } | 949 | } |
946 | else { | 950 | else { |
947 | slotSetCategory( rememberId ); | 951 | slotSetCategory( rememberId ); |
948 | } | 952 | } |
949 | } | 953 | } |
950 | 954 | ||
diff --git a/core/pim/addressbook/addressbook.h b/core/pim/addressbook/addressbook.h index 4c1e2f2..2bedc0b 100644 --- a/core/pim/addressbook/addressbook.h +++ b/core/pim/addressbook/addressbook.h | |||
@@ -39,99 +39,101 @@ class QPopupMenu; | |||
39 | class QToolButton; | 39 | class QToolButton; |
40 | class QDialog; | 40 | class QDialog; |
41 | class Ir; | 41 | class Ir; |
42 | class QAction; | 42 | class QAction; |
43 | class LetterPicker; | 43 | class LetterPicker; |
44 | 44 | ||
45 | class AddressbookWindow: public QMainWindow | 45 | class AddressbookWindow: public QMainWindow |
46 | { | 46 | { |
47 | Q_OBJECT | 47 | Q_OBJECT |
48 | public: | 48 | public: |
49 | enum EntryMode { NewEntry=0, EditEntry }; | 49 | enum EntryMode { NewEntry=0, EditEntry }; |
50 | 50 | ||
51 | AddressbookWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); | 51 | AddressbookWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); |
52 | ~AddressbookWindow(); | 52 | ~AddressbookWindow(); |
53 | 53 | ||
54 | protected: | 54 | protected: |
55 | void resizeEvent( QResizeEvent * e ); | 55 | void resizeEvent( QResizeEvent * e ); |
56 | 56 | ||
57 | void editPersonal(); | 57 | void editPersonal(); |
58 | void editEntry( EntryMode ); | 58 | void editEntry( EntryMode ); |
59 | void closeEvent( QCloseEvent *e ); | 59 | void closeEvent( QCloseEvent *e ); |
60 | bool save(); | 60 | bool save(); |
61 | 61 | ||
62 | public slots: | 62 | public slots: |
63 | void flush(); | 63 | void flush(); |
64 | void reload(); | 64 | void reload(); |
65 | void appMessage(const QCString &, const QByteArray &); | 65 | void appMessage(const QCString &, const QByteArray &); |
66 | void setDocument( const QString & ); | 66 | void setDocument( const QString & ); |
67 | #ifdef __DEBUG_RELEASE | 67 | #ifdef __DEBUG_RELEASE |
68 | void slotSave(); | 68 | void slotSave(); |
69 | #endif | 69 | #endif |
70 | 70 | ||
71 | private slots: | 71 | private slots: |
72 | void importvCard(); | 72 | void importvCard(); |
73 | void slotListNew(); | 73 | void slotListNew(); |
74 | /* void slotListView(); */ | 74 | /* void slotListView(); */ |
75 | void slotListDelete(); | 75 | void slotListDelete(); |
76 | void slotViewBack(); | 76 | void slotViewBack(); |
77 | void slotViewEdit(); | 77 | void slotViewEdit(); |
78 | void slotPersonalView(); | 78 | void slotPersonalView(); |
79 | void listIsEmpty( bool ); | 79 | void listIsEmpty( bool ); |
80 | /* void slotSettings(); */ | 80 | /* void slotSettings(); */ |
81 | void writeMail(); | 81 | void writeMail(); |
82 | void slotBeam(); | 82 | void slotBeam(); |
83 | void beamDone( Ir * ); | 83 | void beamDone( Ir * ); |
84 | void slotSetCategory( int ); | 84 | void slotSetCategory( int ); |
85 | void slotSetLetter( char ); | 85 | void slotSetLetter( char ); |
86 | void slotUpdateToolbar(); | 86 | void slotUpdateToolbar(); |
87 | void slotSetFont(int); | 87 | void slotSetFont(int); |
88 | 88 | ||
89 | void slotFindOpen(); | 89 | void slotFindOpen(); |
90 | void slotFindClose(); | 90 | void slotFindClose(); |
91 | void slotFind(); | 91 | void slotFind(); |
92 | void slotNotFound(); | 92 | void slotNotFound(); |
93 | void slotWrapAround(); | 93 | void slotWrapAround(); |
94 | 94 | ||
95 | void slotViewSwitched( int ); | 95 | void slotViewSwitched( int ); |
96 | void slotListView(); | 96 | void slotListView(); |
97 | void slotCardView(); | 97 | void slotCardView(); |
98 | 98 | ||
99 | void slotConfig(); | 99 | void slotConfig(); |
100 | 100 | ||
101 | private: | 101 | private: |
102 | //void initFields(); // inititialize our fields... | 102 | //void initFields(); // inititialize our fields... |
103 | // AbLabel *abView(); | 103 | // AbLabel *abView(); |
104 | void populateCategories(); | 104 | void populateCategories(); |
105 | 105 | ||
106 | QPopupMenu *catMenu; | 106 | QPopupMenu *catMenu; |
107 | QPEToolBar *listTools; | 107 | QPEToolBar *listTools; |
108 | QToolButton *deleteButton; | 108 | QToolButton *deleteButton; |
109 | //QValueList<int> allFields, orderedFields; | 109 | //QValueList<int> allFields, orderedFields; |
110 | //QStringList slOrderedFields; | 110 | //QStringList slOrderedFields; |
111 | enum Panes { paneList=0, paneView, paneEdit }; | 111 | enum Panes { paneList=0, paneView, paneEdit }; |
112 | ContactEditor *abEditor; | 112 | ContactEditor *abEditor; |
113 | LetterPicker *pLabel; | 113 | LetterPicker *pLabel; |
114 | AbView* m_abView; | 114 | AbView* m_abView; |
115 | QWidget *listContainer; | 115 | QWidget *listContainer; |
116 | 116 | ||
117 | // Searching stuff | 117 | // Searching stuff |
118 | OFloatBar* searchBar; | 118 | OFloatBar* searchBar; |
119 | QLineEdit* searchEdit; | 119 | QLineEdit* searchEdit; |
120 | 120 | ||
121 | QAction *actionNew, *actionEdit, *actionTrash, *actionFind, *actionBeam, *actionPersonal, *actionMail; | 121 | QAction *actionNew, *actionEdit, *actionTrash, *actionFind, *actionBeam, *actionPersonal, *actionMail; |
122 | 122 | ||
123 | int viewMargin; | 123 | int viewMargin; |
124 | 124 | ||
125 | bool syncing; | 125 | bool syncing; |
126 | QFont *defaultFont; | 126 | QFont *defaultFont; |
127 | int m_curFontSize; | 127 | int m_curFontSize; |
128 | 128 | ||
129 | bool isLoading; | 129 | bool isLoading; |
130 | 130 | ||
131 | AbConfig m_config; | 131 | AbConfig m_config; |
132 | 132 | ||
133 | QAction* m_tableViewButton; | 133 | QAction* m_tableViewButton; |
134 | QAction* m_cardViewButton; | 134 | QAction* m_cardViewButton; |
135 | |||
136 | int active_view; | ||
135 | }; | 137 | }; |
136 | 138 | ||
137 | #endif | 139 | #endif |