author | ulf69 <ulf69> | 2004-07-14 15:19:43 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-07-14 15:19:43 (UTC) |
commit | 7868ec2225272318048026a602b842b38a05347f (patch) (unidiff) | |
tree | 5f74a46d29caf601ca52dba4df86cefb21c98e04 | |
parent | 39df2ac65017a41891cd8f856d100378129faa4b (diff) | |
download | kdepimpi-7868ec2225272318048026a602b842b38a05347f.zip kdepimpi-7868ec2225272318048026a602b842b38a05347f.tar.gz kdepimpi-7868ec2225272318048026a602b842b38a05347f.tar.bz2 |
implemented automatic update in case of external resource changes (kdirwatch)
-rw-r--r-- | kaddressbook/kabcore.cpp | 21 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 2 |
2 files changed, 15 insertions, 8 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 8daca33..2b07541 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -847,551 +847,560 @@ void KABCore::addEmail( QString aStr ) | |||
847 | } | 847 | } |
848 | #else //KAB_EMBEDDED | 848 | #else //KAB_EMBEDDED |
849 | qDebug("KABCore::addEmail finsih method"); | 849 | qDebug("KABCore::addEmail finsih method"); |
850 | #endif //KAB_EMBEDDED | 850 | #endif //KAB_EMBEDDED |
851 | } | 851 | } |
852 | 852 | ||
853 | void KABCore::importVCard( const KURL &url, bool showPreview ) | 853 | void KABCore::importVCard( const KURL &url, bool showPreview ) |
854 | { | 854 | { |
855 | mXXPortManager->importVCard( url, showPreview ); | 855 | mXXPortManager->importVCard( url, showPreview ); |
856 | } | 856 | } |
857 | void KABCore::importFromOL() | 857 | void KABCore::importFromOL() |
858 | { | 858 | { |
859 | #ifdef _WIN32_ | 859 | #ifdef _WIN32_ |
860 | KAImportOLdialog* idgl = new KAImportOLdialog( i18n("Import Contacts from OL"), mAddressBook, this ); | 860 | KAImportOLdialog* idgl = new KAImportOLdialog( i18n("Import Contacts from OL"), mAddressBook, this ); |
861 | idgl->exec(); | 861 | idgl->exec(); |
862 | KABC::Addressee::List list = idgl->getAddressList(); | 862 | KABC::Addressee::List list = idgl->getAddressList(); |
863 | if ( list.count() > 0 ) { | 863 | if ( list.count() > 0 ) { |
864 | KABC::Addressee::List listNew; | 864 | KABC::Addressee::List listNew; |
865 | KABC::Addressee::List listExisting; | 865 | KABC::Addressee::List listExisting; |
866 | KABC::Addressee::List::Iterator it; | 866 | KABC::Addressee::List::Iterator it; |
867 | KABC::AddressBook::Iterator iter; | 867 | KABC::AddressBook::Iterator iter; |
868 | for ( it = list.begin(); it != list.end(); ++it ) { | 868 | for ( it = list.begin(); it != list.end(); ++it ) { |
869 | if ( mAddressBook->findByUid((*it).uid() ).isEmpty()) | 869 | if ( mAddressBook->findByUid((*it).uid() ).isEmpty()) |
870 | listNew.append( (*it) ); | 870 | listNew.append( (*it) ); |
871 | else | 871 | else |
872 | listExisting.append( (*it) ); | 872 | listExisting.append( (*it) ); |
873 | } | 873 | } |
874 | if ( listExisting.count() > 0 ) | 874 | if ( listExisting.count() > 0 ) |
875 | KMessageBox::information( this, i18n("%1 contacts not added to addressbook\nbecause they were already in the addressbook!").arg( listExisting.count() )); | 875 | KMessageBox::information( this, i18n("%1 contacts not added to addressbook\nbecause they were already in the addressbook!").arg( listExisting.count() )); |
876 | if ( listNew.count() > 0 ) { | 876 | if ( listNew.count() > 0 ) { |
877 | pasteWithNewUid = false; | 877 | pasteWithNewUid = false; |
878 | pasteContacts( listNew ); | 878 | pasteContacts( listNew ); |
879 | pasteWithNewUid = true; | 879 | pasteWithNewUid = true; |
880 | } | 880 | } |
881 | } | 881 | } |
882 | delete idgl; | 882 | delete idgl; |
883 | #endif | 883 | #endif |
884 | } | 884 | } |
885 | 885 | ||
886 | void KABCore::importVCard( const QString &vCard, bool showPreview ) | 886 | void KABCore::importVCard( const QString &vCard, bool showPreview ) |
887 | { | 887 | { |
888 | mXXPortManager->importVCard( vCard, showPreview ); | 888 | mXXPortManager->importVCard( vCard, showPreview ); |
889 | } | 889 | } |
890 | 890 | ||
891 | //US added a second method without defaultparameter | 891 | //US added a second method without defaultparameter |
892 | void KABCore::editContact2() { | 892 | void KABCore::editContact2() { |
893 | editContact( QString::null ); | 893 | editContact( QString::null ); |
894 | } | 894 | } |
895 | 895 | ||
896 | void KABCore::editContact( const QString &uid ) | 896 | void KABCore::editContact( const QString &uid ) |
897 | { | 897 | { |
898 | 898 | ||
899 | if ( mExtensionManager->isQuickEditVisible() ) | 899 | if ( mExtensionManager->isQuickEditVisible() ) |
900 | return; | 900 | return; |
901 | 901 | ||
902 | // First, locate the contact entry | 902 | // First, locate the contact entry |
903 | QString localUID = uid; | 903 | QString localUID = uid; |
904 | if ( localUID.isNull() ) { | 904 | if ( localUID.isNull() ) { |
905 | QStringList uidList = mViewManager->selectedUids(); | 905 | QStringList uidList = mViewManager->selectedUids(); |
906 | if ( uidList.count() > 0 ) | 906 | if ( uidList.count() > 0 ) |
907 | localUID = *( uidList.at( 0 ) ); | 907 | localUID = *( uidList.at( 0 ) ); |
908 | } | 908 | } |
909 | 909 | ||
910 | KABC::Addressee addr = mAddressBook->findByUid( localUID ); | 910 | KABC::Addressee addr = mAddressBook->findByUid( localUID ); |
911 | if ( !addr.isEmpty() ) { | 911 | if ( !addr.isEmpty() ) { |
912 | mEditorDialog->setAddressee( addr ); | 912 | mEditorDialog->setAddressee( addr ); |
913 | KApplication::execDialog ( mEditorDialog ); | 913 | KApplication::execDialog ( mEditorDialog ); |
914 | } | 914 | } |
915 | } | 915 | } |
916 | 916 | ||
917 | void KABCore::save() | 917 | void KABCore::save() |
918 | { | 918 | { |
919 | if ( !mModified ) | 919 | if ( !mModified ) |
920 | return; | 920 | return; |
921 | QString text = i18n( "There was an error while attempting to save\n the " | 921 | QString text = i18n( "There was an error while attempting to save\n the " |
922 | "address book. Please check that some \nother application is " | 922 | "address book. Please check that some \nother application is " |
923 | "not using it. " ); | 923 | "not using it. " ); |
924 | statusMessage(i18n("Saving addressbook ... ")); | 924 | statusMessage(i18n("Saving addressbook ... ")); |
925 | #ifndef KAB_EMBEDDED | 925 | #ifndef KAB_EMBEDDED |
926 | KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook ); | 926 | KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook ); |
927 | if ( !b || !b->save() ) { | 927 | if ( !b || !b->save() ) { |
928 | KMessageBox::error( this, text, i18n( "Unable to Save" ) ); | 928 | KMessageBox::error( this, text, i18n( "Unable to Save" ) ); |
929 | } | 929 | } |
930 | #else //KAB_EMBEDDED | 930 | #else //KAB_EMBEDDED |
931 | KABC::StdAddressBook *b = (KABC::StdAddressBook*)( mAddressBook ); | 931 | KABC::StdAddressBook *b = (KABC::StdAddressBook*)( mAddressBook ); |
932 | if ( !b || !b->save() ) { | 932 | if ( !b || !b->save() ) { |
933 | QMessageBox::critical( this, i18n( "Unable to Save" ), text, i18n("Ok")); | 933 | QMessageBox::critical( this, i18n( "Unable to Save" ), text, i18n("Ok")); |
934 | } | 934 | } |
935 | #endif //KAB_EMBEDDED | 935 | #endif //KAB_EMBEDDED |
936 | 936 | ||
937 | statusMessage(i18n("Addressbook saved!")); | 937 | statusMessage(i18n("Addressbook saved!")); |
938 | setModified( false ); | 938 | setModified( false ); |
939 | } | 939 | } |
940 | 940 | ||
941 | void KABCore::statusMessage(QString mess , int time ) | 941 | void KABCore::statusMessage(QString mess , int time ) |
942 | { | 942 | { |
943 | //topLevelWidget()->setCaption( mess ); | 943 | //topLevelWidget()->setCaption( mess ); |
944 | // pending setting timer to revome message | 944 | // pending setting timer to revome message |
945 | } | 945 | } |
946 | void KABCore::undo() | 946 | void KABCore::undo() |
947 | { | 947 | { |
948 | UndoStack::instance()->undo(); | 948 | UndoStack::instance()->undo(); |
949 | 949 | ||
950 | // Refresh the view | 950 | // Refresh the view |
951 | mViewManager->refreshView(); | 951 | mViewManager->refreshView(); |
952 | } | 952 | } |
953 | 953 | ||
954 | void KABCore::redo() | 954 | void KABCore::redo() |
955 | { | 955 | { |
956 | RedoStack::instance()->redo(); | 956 | RedoStack::instance()->redo(); |
957 | 957 | ||
958 | // Refresh the view | 958 | // Refresh the view |
959 | mViewManager->refreshView(); | 959 | mViewManager->refreshView(); |
960 | } | 960 | } |
961 | 961 | ||
962 | void KABCore::setJumpButtonBarVisible( bool visible ) | 962 | void KABCore::setJumpButtonBarVisible( bool visible ) |
963 | { | 963 | { |
964 | if ( visible ) | 964 | if ( visible ) |
965 | mJumpButtonBar->show(); | 965 | mJumpButtonBar->show(); |
966 | else | 966 | else |
967 | mJumpButtonBar->hide(); | 967 | mJumpButtonBar->hide(); |
968 | } | 968 | } |
969 | void KABCore::setDetailsToState() | 969 | void KABCore::setDetailsToState() |
970 | { | 970 | { |
971 | setDetailsVisible( mActionDetails->isChecked() ); | 971 | setDetailsVisible( mActionDetails->isChecked() ); |
972 | } | 972 | } |
973 | 973 | ||
974 | void KABCore::setDetailsVisible( bool visible ) | 974 | void KABCore::setDetailsVisible( bool visible ) |
975 | { | 975 | { |
976 | if ( visible ) | 976 | if ( visible ) |
977 | mDetails->show(); | 977 | mDetails->show(); |
978 | else | 978 | else |
979 | mDetails->hide(); | 979 | mDetails->hide(); |
980 | } | 980 | } |
981 | 981 | ||
982 | void KABCore::extensionModified( const KABC::Addressee::List &list ) | 982 | void KABCore::extensionModified( const KABC::Addressee::List &list ) |
983 | { | 983 | { |
984 | 984 | ||
985 | if ( list.count() != 0 ) { | 985 | if ( list.count() != 0 ) { |
986 | KABC::Addressee::List::ConstIterator it; | 986 | KABC::Addressee::List::ConstIterator it; |
987 | for ( it = list.begin(); it != list.end(); ++it ) | 987 | for ( it = list.begin(); it != list.end(); ++it ) |
988 | mAddressBook->insertAddressee( *it ); | 988 | mAddressBook->insertAddressee( *it ); |
989 | if ( list.count() > 1 ) | 989 | if ( list.count() > 1 ) |
990 | setModified(); | 990 | setModified(); |
991 | else | 991 | else |
992 | setModifiedWOrefresh(); | 992 | setModifiedWOrefresh(); |
993 | } | 993 | } |
994 | if ( list.count() == 0 ) | 994 | if ( list.count() == 0 ) |
995 | mViewManager->refreshView(); | 995 | mViewManager->refreshView(); |
996 | else | 996 | else |
997 | mViewManager->refreshView( list[ 0 ].uid() ); | 997 | mViewManager->refreshView( list[ 0 ].uid() ); |
998 | 998 | ||
999 | 999 | ||
1000 | 1000 | ||
1001 | } | 1001 | } |
1002 | 1002 | ||
1003 | QString KABCore::getNameByPhone( const QString &phone ) | 1003 | QString KABCore::getNameByPhone( const QString &phone ) |
1004 | { | 1004 | { |
1005 | #ifndef KAB_EMBEDDED | 1005 | #ifndef KAB_EMBEDDED |
1006 | QRegExp r( "[/*/-/ ]" ); | 1006 | QRegExp r( "[/*/-/ ]" ); |
1007 | QString localPhone( phone ); | 1007 | QString localPhone( phone ); |
1008 | 1008 | ||
1009 | bool found = false; | 1009 | bool found = false; |
1010 | QString ownerName = ""; | 1010 | QString ownerName = ""; |
1011 | KABC::AddressBook::Iterator iter; | 1011 | KABC::AddressBook::Iterator iter; |
1012 | KABC::PhoneNumber::List::Iterator phoneIter; | 1012 | KABC::PhoneNumber::List::Iterator phoneIter; |
1013 | KABC::PhoneNumber::List phoneList; | 1013 | KABC::PhoneNumber::List phoneList; |
1014 | for ( iter = mAddressBook->begin(); !found && ( iter != mAddressBook->end() ); ++iter ) { | 1014 | for ( iter = mAddressBook->begin(); !found && ( iter != mAddressBook->end() ); ++iter ) { |
1015 | phoneList = (*iter).phoneNumbers(); | 1015 | phoneList = (*iter).phoneNumbers(); |
1016 | for ( phoneIter = phoneList.begin(); !found && ( phoneIter != phoneList.end() ); | 1016 | for ( phoneIter = phoneList.begin(); !found && ( phoneIter != phoneList.end() ); |
1017 | ++phoneIter) { | 1017 | ++phoneIter) { |
1018 | // Get rid of separator chars so just the numbers are compared. | 1018 | // Get rid of separator chars so just the numbers are compared. |
1019 | if ( (*phoneIter).number().replace( r, "" ) == localPhone.replace( r, "" ) ) { | 1019 | if ( (*phoneIter).number().replace( r, "" ) == localPhone.replace( r, "" ) ) { |
1020 | ownerName = (*iter).formattedName(); | 1020 | ownerName = (*iter).formattedName(); |
1021 | found = true; | 1021 | found = true; |
1022 | } | 1022 | } |
1023 | } | 1023 | } |
1024 | } | 1024 | } |
1025 | 1025 | ||
1026 | return ownerName; | 1026 | return ownerName; |
1027 | #else //KAB_EMBEDDED | 1027 | #else //KAB_EMBEDDED |
1028 | qDebug("KABCore::getNameByPhone finsih method"); | 1028 | qDebug("KABCore::getNameByPhone finsih method"); |
1029 | return ""; | 1029 | return ""; |
1030 | #endif //KAB_EMBEDDED | 1030 | #endif //KAB_EMBEDDED |
1031 | 1031 | ||
1032 | } | 1032 | } |
1033 | 1033 | ||
1034 | void KABCore::openConfigDialog() | 1034 | void KABCore::openConfigDialog() |
1035 | { | 1035 | { |
1036 | KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"kabconfigdialog", true ); | 1036 | KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"kabconfigdialog", true ); |
1037 | KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog->getNewVBoxPage(i18n( "Addressbook")) , "KCMKabConfig" ); | 1037 | KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog->getNewVBoxPage(i18n( "Addressbook")) , "KCMKabConfig" ); |
1038 | ConfigureDialog->addModule(kabcfg ); | 1038 | ConfigureDialog->addModule(kabcfg ); |
1039 | connect( ConfigureDialog, SIGNAL( applyClicked() ), | 1039 | connect( ConfigureDialog, SIGNAL( applyClicked() ), |
1040 | this, SLOT( configurationChanged() ) ); | 1040 | this, SLOT( configurationChanged() ) ); |
1041 | connect( ConfigureDialog, SIGNAL( okClicked() ), | 1041 | connect( ConfigureDialog, SIGNAL( okClicked() ), |
1042 | this, SLOT( configurationChanged() ) ); | 1042 | this, SLOT( configurationChanged() ) ); |
1043 | saveSettings(); | 1043 | saveSettings(); |
1044 | ConfigureDialog->showMaximized(); | 1044 | ConfigureDialog->showMaximized(); |
1045 | if ( ConfigureDialog->exec() ) | 1045 | if ( ConfigureDialog->exec() ) |
1046 | KMessageBox::information( this, i18n("If you configured \nExtensions,\nplease restart!\n") ); | 1046 | KMessageBox::information( this, i18n("If you configured \nExtensions,\nplease restart!\n") ); |
1047 | delete ConfigureDialog; | 1047 | delete ConfigureDialog; |
1048 | } | 1048 | } |
1049 | 1049 | ||
1050 | void KABCore::openLDAPDialog() | 1050 | void KABCore::openLDAPDialog() |
1051 | { | 1051 | { |
1052 | #ifndef KAB_EMBEDDED | 1052 | #ifndef KAB_EMBEDDED |
1053 | if ( !mLdapSearchDialog ) { | 1053 | if ( !mLdapSearchDialog ) { |
1054 | mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this ); | 1054 | mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this ); |
1055 | connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), mViewManager, | 1055 | connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), mViewManager, |
1056 | SLOT( refreshView() ) ); | 1056 | SLOT( refreshView() ) ); |
1057 | connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), this, | 1057 | connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), this, |
1058 | SLOT( setModified() ) ); | 1058 | SLOT( setModified() ) ); |
1059 | } else | 1059 | } else |
1060 | mLdapSearchDialog->restoreSettings(); | 1060 | mLdapSearchDialog->restoreSettings(); |
1061 | 1061 | ||
1062 | if ( mLdapSearchDialog->isOK() ) | 1062 | if ( mLdapSearchDialog->isOK() ) |
1063 | mLdapSearchDialog->exec(); | 1063 | mLdapSearchDialog->exec(); |
1064 | #else //KAB_EMBEDDED | 1064 | #else //KAB_EMBEDDED |
1065 | qDebug("KABCore::openLDAPDialog() finsih method"); | 1065 | qDebug("KABCore::openLDAPDialog() finsih method"); |
1066 | #endif //KAB_EMBEDDED | 1066 | #endif //KAB_EMBEDDED |
1067 | } | 1067 | } |
1068 | 1068 | ||
1069 | void KABCore::print() | 1069 | void KABCore::print() |
1070 | { | 1070 | { |
1071 | #ifndef KAB_EMBEDDED | 1071 | #ifndef KAB_EMBEDDED |
1072 | KPrinter printer; | 1072 | KPrinter printer; |
1073 | if ( !printer.setup( this ) ) | 1073 | if ( !printer.setup( this ) ) |
1074 | return; | 1074 | return; |
1075 | 1075 | ||
1076 | KABPrinting::PrintingWizard wizard( &printer, mAddressBook, | 1076 | KABPrinting::PrintingWizard wizard( &printer, mAddressBook, |
1077 | mViewManager->selectedUids(), this ); | 1077 | mViewManager->selectedUids(), this ); |
1078 | 1078 | ||
1079 | wizard.exec(); | 1079 | wizard.exec(); |
1080 | #else //KAB_EMBEDDED | 1080 | #else //KAB_EMBEDDED |
1081 | qDebug("KABCore::print() finsih method"); | 1081 | qDebug("KABCore::print() finsih method"); |
1082 | #endif //KAB_EMBEDDED | 1082 | #endif //KAB_EMBEDDED |
1083 | 1083 | ||
1084 | } | 1084 | } |
1085 | 1085 | ||
1086 | 1086 | ||
1087 | void KABCore::addGUIClient( KXMLGUIClient *client ) | 1087 | void KABCore::addGUIClient( KXMLGUIClient *client ) |
1088 | { | 1088 | { |
1089 | if ( mGUIClient ) | 1089 | if ( mGUIClient ) |
1090 | mGUIClient->insertChildClient( client ); | 1090 | mGUIClient->insertChildClient( client ); |
1091 | else | 1091 | else |
1092 | KMessageBox::error( this, "no KXMLGUICLient"); | 1092 | KMessageBox::error( this, "no KXMLGUICLient"); |
1093 | } | 1093 | } |
1094 | 1094 | ||
1095 | 1095 | ||
1096 | void KABCore::configurationChanged() | 1096 | void KABCore::configurationChanged() |
1097 | { | 1097 | { |
1098 | mExtensionManager->reconfigure(); | 1098 | mExtensionManager->reconfigure(); |
1099 | } | 1099 | } |
1100 | 1100 | ||
1101 | void KABCore::addressBookChanged() | 1101 | void KABCore::addressBookChanged() |
1102 | { | 1102 | { |
1103 | #ifndef KAB_EMBEDDED | 1103 | /*US |
1104 | QDictIterator<AddresseeEditorDialog> it( mEditorDict ); | 1104 | QDictIterator<AddresseeEditorDialog> it( mEditorDict ); |
1105 | while ( it.current() ) { | 1105 | while ( it.current() ) { |
1106 | if ( it.current()->dirty() ) { | 1106 | if ( it.current()->dirty() ) { |
1107 | QString text = i18n( "Data has been changed externally. Unsaved " | 1107 | QString text = i18n( "Data has been changed externally. Unsaved " |
1108 | "changes will be lost." ); | 1108 | "changes will be lost." ); |
1109 | KMessageBox::information( this, text ); | 1109 | KMessageBox::information( this, text ); |
1110 | } | 1110 | } |
1111 | it.current()->setAddressee( mAddressBook->findByUid( it.currentKey() ) ); | 1111 | it.current()->setAddressee( mAddressBook->findByUid( it.currentKey() ) ); |
1112 | ++it; | 1112 | ++it; |
1113 | } | 1113 | } |
1114 | 1114 | */ | |
1115 | if (mEditorDialog) | ||
1116 | { | ||
1117 | if (mEditorDialog->dirty()) | ||
1118 | { | ||
1119 | QString text = i18n( "Data has been changed externally. Unsaved " | ||
1120 | "changes will be lost." ); | ||
1121 | KMessageBox::information( this, text ); | ||
1122 | } | ||
1123 | QString currentuid = mEditorDialog->addressee().uid(); | ||
1124 | mEditorDialog->setAddressee( mAddressBook->findByUid( currentuid ) ); | ||
1125 | } | ||
1115 | mViewManager->refreshView(); | 1126 | mViewManager->refreshView(); |
1116 | #else //KAB_EMBEDDED | 1127 | |
1117 | qDebug("KABCore::addressBookChanged() finsih method"); | 1128 | |
1118 | #endif //KAB_EMBEDDED | ||
1119 | } | 1129 | } |
1120 | 1130 | ||
1121 | AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent, | 1131 | AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent, |
1122 | const char *name ) | 1132 | const char *name ) |
1123 | { | 1133 | { |
1124 | 1134 | ||
1125 | if ( mEditorDialog == 0 ) { | 1135 | if ( mEditorDialog == 0 ) { |
1126 | mEditorDialog = new AddresseeEditorDialog( this, parent, | 1136 | mEditorDialog = new AddresseeEditorDialog( this, parent, |
1127 | name ? name : "editorDialog" ); | 1137 | name ? name : "editorDialog" ); |
1128 | 1138 | ||
1129 | 1139 | ||
1130 | connect( mEditorDialog, SIGNAL( contactModified( const KABC::Addressee& ) ), | 1140 | connect( mEditorDialog, SIGNAL( contactModified( const KABC::Addressee& ) ), |
1131 | SLOT( contactModified( const KABC::Addressee& ) ) ); | 1141 | SLOT( contactModified( const KABC::Addressee& ) ) ); |
1132 | //connect( mEditorDialog, SIGNAL( editorDestroyed( const QString& ) ), | 1142 | //connect( mEditorDialog, SIGNAL( editorDestroyed( const QString& ) ), |
1133 | // SLOT( slotEditorDestroyed( const QString& ) ) ); | 1143 | // SLOT( slotEditorDestroyed( const QString& ) ) ); |
1134 | } | 1144 | } |
1135 | 1145 | ||
1136 | return mEditorDialog; | 1146 | return mEditorDialog; |
1137 | } | 1147 | } |
1138 | 1148 | ||
1139 | void KABCore::slotEditorDestroyed( const QString &uid ) | 1149 | void KABCore::slotEditorDestroyed( const QString &uid ) |
1140 | { | 1150 | { |
1141 | qDebug("KABCore::slotEditorDestroyed called. maybe a problem! "); | ||
1142 | //mEditorDict.remove( uid ); | 1151 | //mEditorDict.remove( uid ); |
1143 | } | 1152 | } |
1144 | 1153 | ||
1145 | void KABCore::initGUI() | 1154 | void KABCore::initGUI() |
1146 | { | 1155 | { |
1147 | #ifndef KAB_EMBEDDED | 1156 | #ifndef KAB_EMBEDDED |
1148 | QHBoxLayout *topLayout = new QHBoxLayout( this ); | 1157 | QHBoxLayout *topLayout = new QHBoxLayout( this ); |
1149 | topLayout->setSpacing( KDialogBase::spacingHint() ); | 1158 | topLayout->setSpacing( KDialogBase::spacingHint() ); |
1150 | 1159 | ||
1151 | mExtensionBarSplitter = new QSplitter( this ); | 1160 | mExtensionBarSplitter = new QSplitter( this ); |
1152 | mExtensionBarSplitter->setOrientation( Qt::Vertical ); | 1161 | mExtensionBarSplitter->setOrientation( Qt::Vertical ); |
1153 | 1162 | ||
1154 | mDetailsSplitter = new QSplitter( mExtensionBarSplitter ); | 1163 | mDetailsSplitter = new QSplitter( mExtensionBarSplitter ); |
1155 | 1164 | ||
1156 | QVBox *viewSpace = new QVBox( mDetailsSplitter ); | 1165 | QVBox *viewSpace = new QVBox( mDetailsSplitter ); |
1157 | mIncSearchWidget = new IncSearchWidget( viewSpace ); | 1166 | mIncSearchWidget = new IncSearchWidget( viewSpace ); |
1158 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), | 1167 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), |
1159 | SLOT( incrementalSearch( const QString& ) ) ); | 1168 | SLOT( incrementalSearch( const QString& ) ) ); |
1160 | 1169 | ||
1161 | mViewManager = new ViewManager( this, viewSpace ); | 1170 | mViewManager = new ViewManager( this, viewSpace ); |
1162 | viewSpace->setStretchFactor( mViewManager, 1 ); | 1171 | viewSpace->setStretchFactor( mViewManager, 1 ); |
1163 | 1172 | ||
1164 | mDetails = new ViewContainer( mDetailsSplitter ); | 1173 | mDetails = new ViewContainer( mDetailsSplitter ); |
1165 | 1174 | ||
1166 | mJumpButtonBar = new JumpButtonBar( this, this ); | 1175 | mJumpButtonBar = new JumpButtonBar( this, this ); |
1167 | 1176 | ||
1168 | mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); | 1177 | mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); |
1169 | 1178 | ||
1170 | topLayout->addWidget( mExtensionBarSplitter ); | 1179 | topLayout->addWidget( mExtensionBarSplitter ); |
1171 | topLayout->setStretchFactor( mExtensionBarSplitter, 100 ); | 1180 | topLayout->setStretchFactor( mExtensionBarSplitter, 100 ); |
1172 | topLayout->addWidget( mJumpButtonBar ); | 1181 | topLayout->addWidget( mJumpButtonBar ); |
1173 | topLayout->setStretchFactor( mJumpButtonBar, 1 ); | 1182 | topLayout->setStretchFactor( mJumpButtonBar, 1 ); |
1174 | 1183 | ||
1175 | mXXPortManager = new XXPortManager( this, this ); | 1184 | mXXPortManager = new XXPortManager( this, this ); |
1176 | 1185 | ||
1177 | #else //KAB_EMBEDDED | 1186 | #else //KAB_EMBEDDED |
1178 | //US initialize viewMenu before settingup viewmanager. | 1187 | //US initialize viewMenu before settingup viewmanager. |
1179 | // Viewmanager needs this menu to plugin submenues. | 1188 | // Viewmanager needs this menu to plugin submenues. |
1180 | viewMenu = new QPopupMenu( this ); | 1189 | viewMenu = new QPopupMenu( this ); |
1181 | settingsMenu = new QPopupMenu( this ); | 1190 | settingsMenu = new QPopupMenu( this ); |
1182 | //filterMenu = new QPopupMenu( this ); | 1191 | //filterMenu = new QPopupMenu( this ); |
1183 | ImportMenu = new QPopupMenu( this ); | 1192 | ImportMenu = new QPopupMenu( this ); |
1184 | ExportMenu = new QPopupMenu( this ); | 1193 | ExportMenu = new QPopupMenu( this ); |
1185 | 1194 | ||
1186 | changeMenu= new QPopupMenu( this ); | 1195 | changeMenu= new QPopupMenu( this ); |
1187 | 1196 | ||
1188 | //US since we have no splitter for the embedded system, setup | 1197 | //US since we have no splitter for the embedded system, setup |
1189 | // a layout with two frames. One left and one right. | 1198 | // a layout with two frames. One left and one right. |
1190 | 1199 | ||
1191 | QBoxLayout *topLayout; | 1200 | QBoxLayout *topLayout; |
1192 | 1201 | ||
1193 | // = new QHBoxLayout( this ); | 1202 | // = new QHBoxLayout( this ); |
1194 | // QBoxLayout *topLayout = (QBoxLayout*)layout(); | 1203 | // QBoxLayout *topLayout = (QBoxLayout*)layout(); |
1195 | 1204 | ||
1196 | // QWidget *mainBox = new QWidget( this ); | 1205 | // QWidget *mainBox = new QWidget( this ); |
1197 | // QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox); | 1206 | // QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox); |
1198 | 1207 | ||
1199 | #ifdef DESKTOP_VERSION | 1208 | #ifdef DESKTOP_VERSION |
1200 | topLayout = new QHBoxLayout( this ); | 1209 | topLayout = new QHBoxLayout( this ); |
1201 | 1210 | ||
1202 | 1211 | ||
1203 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); | 1212 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); |
1204 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); | 1213 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); |
1205 | 1214 | ||
1206 | topLayout->addWidget(mMiniSplitter ); | 1215 | topLayout->addWidget(mMiniSplitter ); |
1207 | 1216 | ||
1208 | mExtensionBarSplitter = new KDGanttMinimizeSplitter( Qt::Vertical,mMiniSplitter ); | 1217 | mExtensionBarSplitter = new KDGanttMinimizeSplitter( Qt::Vertical,mMiniSplitter ); |
1209 | mExtensionBarSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); | 1218 | mExtensionBarSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); |
1210 | mViewManager = new ViewManager( this, mExtensionBarSplitter ); | 1219 | mViewManager = new ViewManager( this, mExtensionBarSplitter ); |
1211 | mDetails = new ViewContainer( mMiniSplitter ); | 1220 | mDetails = new ViewContainer( mMiniSplitter ); |
1212 | mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); | 1221 | mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); |
1213 | #else | 1222 | #else |
1214 | if ( QApplication::desktop()->width() > 480 ) { | 1223 | if ( QApplication::desktop()->width() > 480 ) { |
1215 | topLayout = new QHBoxLayout( this ); | 1224 | topLayout = new QHBoxLayout( this ); |
1216 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); | 1225 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); |
1217 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); | 1226 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); |
1218 | } else { | 1227 | } else { |
1219 | 1228 | ||
1220 | topLayout = new QHBoxLayout( this ); | 1229 | topLayout = new QHBoxLayout( this ); |
1221 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this); | 1230 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this); |
1222 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); | 1231 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); |
1223 | } | 1232 | } |
1224 | 1233 | ||
1225 | topLayout->addWidget(mMiniSplitter ); | 1234 | topLayout->addWidget(mMiniSplitter ); |
1226 | mViewManager = new ViewManager( this, mMiniSplitter ); | 1235 | mViewManager = new ViewManager( this, mMiniSplitter ); |
1227 | mDetails = new ViewContainer( mMiniSplitter ); | 1236 | mDetails = new ViewContainer( mMiniSplitter ); |
1228 | 1237 | ||
1229 | 1238 | ||
1230 | mExtensionManager = new ExtensionManager( this, mMiniSplitter ); | 1239 | mExtensionManager = new ExtensionManager( this, mMiniSplitter ); |
1231 | #endif | 1240 | #endif |
1232 | //eh->hide(); | 1241 | //eh->hide(); |
1233 | // topLayout->addWidget(mExtensionManager ); | 1242 | // topLayout->addWidget(mExtensionManager ); |
1234 | 1243 | ||
1235 | 1244 | ||
1236 | /*US | 1245 | /*US |
1237 | #ifndef KAB_NOSPLITTER | 1246 | #ifndef KAB_NOSPLITTER |
1238 | QHBoxLayout *topLayout = new QHBoxLayout( this ); | 1247 | QHBoxLayout *topLayout = new QHBoxLayout( this ); |
1239 | //US topLayout->setSpacing( KDialogBase::spacingHint() ); | 1248 | //US topLayout->setSpacing( KDialogBase::spacingHint() ); |
1240 | topLayout->setSpacing( 10 ); | 1249 | topLayout->setSpacing( 10 ); |
1241 | 1250 | ||
1242 | mDetailsSplitter = new QSplitter( this ); | 1251 | mDetailsSplitter = new QSplitter( this ); |
1243 | 1252 | ||
1244 | QVBox *viewSpace = new QVBox( mDetailsSplitter ); | 1253 | QVBox *viewSpace = new QVBox( mDetailsSplitter ); |
1245 | 1254 | ||
1246 | mViewManager = new ViewManager( this, viewSpace ); | 1255 | mViewManager = new ViewManager( this, viewSpace ); |
1247 | viewSpace->setStretchFactor( mViewManager, 1 ); | 1256 | viewSpace->setStretchFactor( mViewManager, 1 ); |
1248 | 1257 | ||
1249 | mDetails = new ViewContainer( mDetailsSplitter ); | 1258 | mDetails = new ViewContainer( mDetailsSplitter ); |
1250 | 1259 | ||
1251 | topLayout->addWidget( mDetailsSplitter ); | 1260 | topLayout->addWidget( mDetailsSplitter ); |
1252 | topLayout->setStretchFactor( mDetailsSplitter, 100 ); | 1261 | topLayout->setStretchFactor( mDetailsSplitter, 100 ); |
1253 | #else //KAB_NOSPLITTER | 1262 | #else //KAB_NOSPLITTER |
1254 | QHBoxLayout *topLayout = new QHBoxLayout( this ); | 1263 | QHBoxLayout *topLayout = new QHBoxLayout( this ); |
1255 | //US topLayout->setSpacing( KDialogBase::spacingHint() ); | 1264 | //US topLayout->setSpacing( KDialogBase::spacingHint() ); |
1256 | topLayout->setSpacing( 10 ); | 1265 | topLayout->setSpacing( 10 ); |
1257 | 1266 | ||
1258 | // mDetailsSplitter = new QSplitter( this ); | 1267 | // mDetailsSplitter = new QSplitter( this ); |
1259 | 1268 | ||
1260 | QVBox *viewSpace = new QVBox( this ); | 1269 | QVBox *viewSpace = new QVBox( this ); |
1261 | 1270 | ||
1262 | mViewManager = new ViewManager( this, viewSpace ); | 1271 | mViewManager = new ViewManager( this, viewSpace ); |
1263 | viewSpace->setStretchFactor( mViewManager, 1 ); | 1272 | viewSpace->setStretchFactor( mViewManager, 1 ); |
1264 | 1273 | ||
1265 | mDetails = new ViewContainer( this ); | 1274 | mDetails = new ViewContainer( this ); |
1266 | 1275 | ||
1267 | topLayout->addWidget( viewSpace ); | 1276 | topLayout->addWidget( viewSpace ); |
1268 | // topLayout->setStretchFactor( mDetailsSplitter, 100 ); | 1277 | // topLayout->setStretchFactor( mDetailsSplitter, 100 ); |
1269 | topLayout->addWidget( mDetails ); | 1278 | topLayout->addWidget( mDetails ); |
1270 | #endif //KAB_NOSPLITTER | 1279 | #endif //KAB_NOSPLITTER |
1271 | */ | 1280 | */ |
1272 | 1281 | ||
1273 | 1282 | ||
1274 | #endif //KAB_EMBEDDED | 1283 | #endif //KAB_EMBEDDED |
1275 | initActions(); | 1284 | initActions(); |
1276 | 1285 | ||
1277 | #ifdef KAB_EMBEDDED | 1286 | #ifdef KAB_EMBEDDED |
1278 | addActionsManually(); | 1287 | addActionsManually(); |
1279 | //US make sure the export and import menues are initialized before creating the xxPortManager. | 1288 | //US make sure the export and import menues are initialized before creating the xxPortManager. |
1280 | mXXPortManager = new XXPortManager( this, this ); | 1289 | mXXPortManager = new XXPortManager( this, this ); |
1281 | 1290 | ||
1282 | // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() ); | 1291 | // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() ); |
1283 | //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget); | 1292 | //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget); |
1284 | // mActionQuit->plug ( mMainWindow->toolBar()); | 1293 | // mActionQuit->plug ( mMainWindow->toolBar()); |
1285 | //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() ); | 1294 | //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() ); |
1286 | //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget); | 1295 | //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget); |
1287 | // mIncSearchWidget->hide(); | 1296 | // mIncSearchWidget->hide(); |
1288 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), | 1297 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), |
1289 | SLOT( incrementalSearch( const QString& ) ) ); | 1298 | SLOT( incrementalSearch( const QString& ) ) ); |
1290 | 1299 | ||
1291 | 1300 | ||
1292 | mJumpButtonBar = new JumpButtonBar( this, this ); | 1301 | mJumpButtonBar = new JumpButtonBar( this, this ); |
1293 | 1302 | ||
1294 | topLayout->addWidget( mJumpButtonBar ); | 1303 | topLayout->addWidget( mJumpButtonBar ); |
1295 | //US topLayout->setStretchFactor( mJumpButtonBar, 10 ); | 1304 | //US topLayout->setStretchFactor( mJumpButtonBar, 10 ); |
1296 | 1305 | ||
1297 | // mMainWindow->getIconToolBar()->raise(); | 1306 | // mMainWindow->getIconToolBar()->raise(); |
1298 | 1307 | ||
1299 | #endif //KAB_EMBEDDED | 1308 | #endif //KAB_EMBEDDED |
1300 | 1309 | ||
1301 | } | 1310 | } |
1302 | void KABCore::initActions() | 1311 | void KABCore::initActions() |
1303 | { | 1312 | { |
1304 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); | 1313 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); |
1305 | 1314 | ||
1306 | #ifndef KAB_EMBEDDED | 1315 | #ifndef KAB_EMBEDDED |
1307 | connect( QApplication::clipboard(), SIGNAL( dataChanged() ), | 1316 | connect( QApplication::clipboard(), SIGNAL( dataChanged() ), |
1308 | SLOT( clipboardDataChanged() ) ); | 1317 | SLOT( clipboardDataChanged() ) ); |
1309 | #endif //KAB_EMBEDDED | 1318 | #endif //KAB_EMBEDDED |
1310 | 1319 | ||
1311 | // file menu | 1320 | // file menu |
1312 | if ( mIsPart ) { | 1321 | if ( mIsPart ) { |
1313 | mActionMail = new KAction( i18n( "&Mail" ), "mail_generic", 0, this, | 1322 | mActionMail = new KAction( i18n( "&Mail" ), "mail_generic", 0, this, |
1314 | SLOT( sendMail() ), actionCollection(), | 1323 | SLOT( sendMail() ), actionCollection(), |
1315 | "kaddressbook_mail" ); | 1324 | "kaddressbook_mail" ); |
1316 | mActionPrint = new KAction( i18n( "&Print" ), "fileprint", CTRL + Key_P, this, | 1325 | mActionPrint = new KAction( i18n( "&Print" ), "fileprint", CTRL + Key_P, this, |
1317 | SLOT( print() ), actionCollection(), "kaddressbook_print" ); | 1326 | SLOT( print() ), actionCollection(), "kaddressbook_print" ); |
1318 | 1327 | ||
1319 | } else { | 1328 | } else { |
1320 | mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() ); | 1329 | mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() ); |
1321 | mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() ); | 1330 | mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() ); |
1322 | } | 1331 | } |
1323 | 1332 | ||
1324 | mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this, | 1333 | mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this, |
1325 | SLOT( save() ), actionCollection(), "file_sync" ); | 1334 | SLOT( save() ), actionCollection(), "file_sync" ); |
1326 | 1335 | ||
1327 | mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this, | 1336 | mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this, |
1328 | SLOT( newContact() ), actionCollection(), "file_new_contact" ); | 1337 | SLOT( newContact() ), actionCollection(), "file_new_contact" ); |
1329 | 1338 | ||
1330 | mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0, | 1339 | mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0, |
1331 | this, SLOT( mailVCard() ), | 1340 | this, SLOT( mailVCard() ), |
1332 | actionCollection(), "file_mail_vcard"); | 1341 | actionCollection(), "file_mail_vcard"); |
1333 | 1342 | ||
1334 | mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0, | 1343 | mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0, |
1335 | this, SLOT( editContact2() ), | 1344 | this, SLOT( editContact2() ), |
1336 | actionCollection(), "file_properties" ); | 1345 | actionCollection(), "file_properties" ); |
1337 | 1346 | ||
1338 | #ifdef KAB_EMBEDDED | 1347 | #ifdef KAB_EMBEDDED |
1339 | // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() ); | 1348 | // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() ); |
1340 | mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0, | 1349 | mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0, |
1341 | mMainWindow, SLOT( exit() ), | 1350 | mMainWindow, SLOT( exit() ), |
1342 | actionCollection(), "quit" ); | 1351 | actionCollection(), "quit" ); |
1343 | #endif //KAB_EMBEDDED | 1352 | #endif //KAB_EMBEDDED |
1344 | 1353 | ||
1345 | // edit menu | 1354 | // edit menu |
1346 | if ( mIsPart ) { | 1355 | if ( mIsPart ) { |
1347 | mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this, | 1356 | mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this, |
1348 | SLOT( copyContacts() ), actionCollection(), | 1357 | SLOT( copyContacts() ), actionCollection(), |
1349 | "kaddressbook_copy" ); | 1358 | "kaddressbook_copy" ); |
1350 | mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this, | 1359 | mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this, |
1351 | SLOT( cutContacts() ), actionCollection(), | 1360 | SLOT( cutContacts() ), actionCollection(), |
1352 | "kaddressbook_cut" ); | 1361 | "kaddressbook_cut" ); |
1353 | mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this, | 1362 | mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this, |
1354 | SLOT( pasteContacts() ), actionCollection(), | 1363 | SLOT( pasteContacts() ), actionCollection(), |
1355 | "kaddressbook_paste" ); | 1364 | "kaddressbook_paste" ); |
1356 | mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this, | 1365 | mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this, |
1357 | SLOT( selectAllContacts() ), actionCollection(), | 1366 | SLOT( selectAllContacts() ), actionCollection(), |
1358 | "kaddressbook_select_all" ); | 1367 | "kaddressbook_select_all" ); |
1359 | mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this, | 1368 | mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this, |
1360 | SLOT( undo() ), actionCollection(), | 1369 | SLOT( undo() ), actionCollection(), |
1361 | "kaddressbook_undo" ); | 1370 | "kaddressbook_undo" ); |
1362 | mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z, | 1371 | mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z, |
1363 | this, SLOT( redo() ), actionCollection(), | 1372 | this, SLOT( redo() ), actionCollection(), |
1364 | "kaddressbook_redo" ); | 1373 | "kaddressbook_redo" ); |
1365 | } else { | 1374 | } else { |
1366 | mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() ); | 1375 | mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() ); |
1367 | mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() ); | 1376 | mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() ); |
1368 | mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() ); | 1377 | mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() ); |
1369 | mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() ); | 1378 | mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() ); |
1370 | mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() ); | 1379 | mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() ); |
1371 | mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() ); | 1380 | mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() ); |
1372 | } | 1381 | } |
1373 | 1382 | ||
1374 | mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete", | 1383 | mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete", |
1375 | Key_Delete, this, SLOT( deleteContacts() ), | 1384 | Key_Delete, this, SLOT( deleteContacts() ), |
1376 | actionCollection(), "edit_delete" ); | 1385 | actionCollection(), "edit_delete" ); |
1377 | 1386 | ||
1378 | mActionUndo->setEnabled( false ); | 1387 | mActionUndo->setEnabled( false ); |
1379 | mActionRedo->setEnabled( false ); | 1388 | mActionRedo->setEnabled( false ); |
1380 | 1389 | ||
1381 | // settings menu | 1390 | // settings menu |
1382 | #ifdef KAB_EMBEDDED | 1391 | #ifdef KAB_EMBEDDED |
1383 | //US special menuentry to configure the addressbook resources. On KDE | 1392 | //US special menuentry to configure the addressbook resources. On KDE |
1384 | // you do that through the control center !!! | 1393 | // you do that through the control center !!! |
1385 | mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this, | 1394 | mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this, |
1386 | SLOT( configureResources() ), actionCollection(), | 1395 | SLOT( configureResources() ), actionCollection(), |
1387 | "kaddressbook_configure_resources" ); | 1396 | "kaddressbook_configure_resources" ); |
1388 | #endif //KAB_EMBEDDED | 1397 | #endif //KAB_EMBEDDED |
1389 | 1398 | ||
1390 | if ( mIsPart ) { | 1399 | if ( mIsPart ) { |
1391 | mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this, | 1400 | mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this, |
1392 | SLOT( openConfigDialog() ), actionCollection(), | 1401 | SLOT( openConfigDialog() ), actionCollection(), |
1393 | "kaddressbook_configure" ); | 1402 | "kaddressbook_configure" ); |
1394 | 1403 | ||
1395 | mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0, | 1404 | mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0, |
1396 | this, SLOT( configureKeyBindings() ), actionCollection(), | 1405 | this, SLOT( configureKeyBindings() ), actionCollection(), |
1397 | "kaddressbook_configure_shortcuts" ); | 1406 | "kaddressbook_configure_shortcuts" ); |
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index 69a98a5..6446974 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h | |||
@@ -103,324 +103,322 @@ class KABCore : public QWidget | |||
103 | */ | 103 | */ |
104 | static KConfig *config(); | 104 | static KConfig *config(); |
105 | 105 | ||
106 | /** | 106 | /** |
107 | Returns a pointer to the global KActionCollection object. So | 107 | Returns a pointer to the global KActionCollection object. So |
108 | other classes can register their actions easily. | 108 | other classes can register their actions easily. |
109 | */ | 109 | */ |
110 | KActionCollection *actionCollection() const; | 110 | KActionCollection *actionCollection() const; |
111 | 111 | ||
112 | /** | 112 | /** |
113 | Returns the current search field of the Incremental Search Widget. | 113 | Returns the current search field of the Incremental Search Widget. |
114 | */ | 114 | */ |
115 | KABC::Field *currentSearchField() const; | 115 | KABC::Field *currentSearchField() const; |
116 | 116 | ||
117 | /** | 117 | /** |
118 | Returns the uid list of the currently selected contacts. | 118 | Returns the uid list of the currently selected contacts. |
119 | */ | 119 | */ |
120 | QStringList selectedUIDs() const; | 120 | QStringList selectedUIDs() const; |
121 | 121 | ||
122 | /** | 122 | /** |
123 | Displays the ResourceSelectDialog and returns the selected | 123 | Displays the ResourceSelectDialog and returns the selected |
124 | resource or a null pointer if no resource was selected by | 124 | resource or a null pointer if no resource was selected by |
125 | the user. | 125 | the user. |
126 | */ | 126 | */ |
127 | KABC::Resource *requestResource( QWidget *parent ); | 127 | KABC::Resource *requestResource( QWidget *parent ); |
128 | 128 | ||
129 | #ifndef KAB_EMBEDDED | 129 | #ifndef KAB_EMBEDDED |
130 | static KAboutData *createAboutData(); | 130 | static KAboutData *createAboutData(); |
131 | #endif //KAB_EMBEDDED | 131 | #endif //KAB_EMBEDDED |
132 | 132 | ||
133 | #ifdef KAB_EMBEDDED | 133 | #ifdef KAB_EMBEDDED |
134 | inline QPopupMenu* getImportMenu() { return ImportMenu;} | 134 | inline QPopupMenu* getImportMenu() { return ImportMenu;} |
135 | inline QPopupMenu* getExportMenu() { return ExportMenu;} | 135 | inline QPopupMenu* getExportMenu() { return ExportMenu;} |
136 | #endif //KAB_EMBEDDED | 136 | #endif //KAB_EMBEDDED |
137 | 137 | ||
138 | public slots: | 138 | public slots: |
139 | #ifdef KAB_EMBEDDED | 139 | #ifdef KAB_EMBEDDED |
140 | void createAboutData(); | 140 | void createAboutData(); |
141 | #endif //KAB_EMBEDDED | 141 | #endif //KAB_EMBEDDED |
142 | 142 | ||
143 | void statusMessage(QString, int time = 0 ); | 143 | void statusMessage(QString, int time = 0 ); |
144 | /** | 144 | /** |
145 | Is called whenever a contact is selected in the view. | 145 | Is called whenever a contact is selected in the view. |
146 | */ | 146 | */ |
147 | void setContactSelected( const QString &uid ); | 147 | void setContactSelected( const QString &uid ); |
148 | 148 | ||
149 | /** | 149 | /** |
150 | Opens the preferred mail composer with all selected contacts as | 150 | Opens the preferred mail composer with all selected contacts as |
151 | arguments. | 151 | arguments. |
152 | */ | 152 | */ |
153 | void sendMail(); | 153 | void sendMail(); |
154 | 154 | ||
155 | /** | 155 | /** |
156 | Opens the preferred mail composer with the given contacts as | 156 | Opens the preferred mail composer with the given contacts as |
157 | arguments. | 157 | arguments. |
158 | */ | 158 | */ |
159 | void sendMail( const QString& email ); | 159 | void sendMail( const QString& email ); |
160 | 160 | ||
161 | 161 | ||
162 | void mailVCard(); | 162 | void mailVCard(); |
163 | void mailVCard(const QStringList& uids); | 163 | void mailVCard(const QStringList& uids); |
164 | 164 | ||
165 | /** | 165 | /** |
166 | Starts the preferred web browser with the given URL as argument. | 166 | Starts the preferred web browser with the given URL as argument. |
167 | */ | 167 | */ |
168 | void browse( const QString& url ); | 168 | void browse( const QString& url ); |
169 | 169 | ||
170 | /** | 170 | /** |
171 | Select all contacts in the view. | 171 | Select all contacts in the view. |
172 | */ | 172 | */ |
173 | void selectAllContacts(); | 173 | void selectAllContacts(); |
174 | 174 | ||
175 | /** | 175 | /** |
176 | Deletes all selected contacts from the address book. | 176 | Deletes all selected contacts from the address book. |
177 | */ | 177 | */ |
178 | void deleteContacts(); | 178 | void deleteContacts(); |
179 | 179 | ||
180 | /** | 180 | /** |
181 | Deletes given contacts from the address book. | 181 | Deletes given contacts from the address book. |
182 | 182 | ||
183 | @param uids The uids of the contacts, which shall be deleted. | 183 | @param uids The uids of the contacts, which shall be deleted. |
184 | */ | 184 | */ |
185 | void deleteContacts( const QStringList &uids ); | 185 | void deleteContacts( const QStringList &uids ); |
186 | 186 | ||
187 | /** | 187 | /** |
188 | Copys the selected contacts into clipboard for later pasting. | 188 | Copys the selected contacts into clipboard for later pasting. |
189 | */ | 189 | */ |
190 | void copyContacts(); | 190 | void copyContacts(); |
191 | 191 | ||
192 | /** | 192 | /** |
193 | Cuts the selected contacts and stores them for later pasting. | 193 | Cuts the selected contacts and stores them for later pasting. |
194 | */ | 194 | */ |
195 | void cutContacts(); | 195 | void cutContacts(); |
196 | 196 | ||
197 | /** | 197 | /** |
198 | Paste contacts from clipboard into the address book. | 198 | Paste contacts from clipboard into the address book. |
199 | */ | 199 | */ |
200 | void pasteContacts(); | 200 | void pasteContacts(); |
201 | 201 | ||
202 | /** | 202 | /** |
203 | Paste given contacts into the address book. | 203 | Paste given contacts into the address book. |
204 | 204 | ||
205 | @param list The list of addressee, which shall be pasted. | 205 | @param list The list of addressee, which shall be pasted. |
206 | */ | 206 | */ |
207 | void pasteContacts( KABC::Addressee::List &list ); | 207 | void pasteContacts( KABC::Addressee::List &list ); |
208 | 208 | ||
209 | /** | 209 | /** |
210 | Sets the whoAmI contact, that is used by many other programs to | 210 | Sets the whoAmI contact, that is used by many other programs to |
211 | get personal information about the current user. | 211 | get personal information about the current user. |
212 | */ | 212 | */ |
213 | void setWhoAmI(); | 213 | void setWhoAmI(); |
214 | 214 | ||
215 | /** | 215 | /** |
216 | Displays the category dialog and applies the result to all | 216 | Displays the category dialog and applies the result to all |
217 | selected contacts. | 217 | selected contacts. |
218 | */ | 218 | */ |
219 | void setCategories(); | 219 | void setCategories(); |
220 | 220 | ||
221 | /** | 221 | /** |
222 | Sets the field list of the Incremental Search Widget. | 222 | Sets the field list of the Incremental Search Widget. |
223 | */ | 223 | */ |
224 | void setSearchFields( const KABC::Field::List &fields ); | 224 | void setSearchFields( const KABC::Field::List &fields ); |
225 | 225 | ||
226 | /** | 226 | /** |
227 | Search with the current search field for a contact, that matches | 227 | Search with the current search field for a contact, that matches |
228 | the given text, and selects it in the view. | 228 | the given text, and selects it in the view. |
229 | */ | 229 | */ |
230 | void incrementalSearch( const QString& text ); | 230 | void incrementalSearch( const QString& text ); |
231 | 231 | ||
232 | /** | 232 | /** |
233 | Marks the address book as modified. | 233 | Marks the address book as modified. |
234 | */ | 234 | */ |
235 | void setModified(); | 235 | void setModified(); |
236 | /** | 236 | /** |
237 | Marks the address book as modified without refreshing the view. | 237 | Marks the address book as modified without refreshing the view. |
238 | */ | 238 | */ |
239 | void setModifiedWOrefresh(); | 239 | void setModifiedWOrefresh(); |
240 | 240 | ||
241 | /** | 241 | /** |
242 | Marks the address book as modified concerning the argument. | 242 | Marks the address book as modified concerning the argument. |
243 | */ | 243 | */ |
244 | void setModified( bool modified ); | 244 | void setModified( bool modified ); |
245 | 245 | ||
246 | /** | 246 | /** |
247 | Returns whether the address book is modified. | 247 | Returns whether the address book is modified. |
248 | */ | 248 | */ |
249 | bool modified() const; | 249 | bool modified() const; |
250 | 250 | ||
251 | /** | 251 | /** |
252 | Called whenever an contact is modified in the contact editor | 252 | Called whenever an contact is modified in the contact editor |
253 | dialog or the quick edit. | 253 | dialog or the quick edit. |
254 | */ | 254 | */ |
255 | void contactModified( const KABC::Addressee &addr ); | 255 | void contactModified( const KABC::Addressee &addr ); |
256 | 256 | ||
257 | /** | 257 | /** |
258 | DCOP METHODS. | 258 | DCOP METHODS. |
259 | */ | 259 | */ |
260 | void addEmail( QString addr ); | 260 | void addEmail( QString addr ); |
261 | void importVCard( const KURL& url, bool showPreview ); | 261 | void importVCard( const KURL& url, bool showPreview ); |
262 | void importVCard( const QString& vCard, bool showPreview ); | 262 | void importVCard( const QString& vCard, bool showPreview ); |
263 | void newContact(); | 263 | void newContact(); |
264 | QString getNameByPhone( const QString& phone ); | 264 | QString getNameByPhone( const QString& phone ); |
265 | /** | 265 | /** |
266 | END DCOP METHODS | 266 | END DCOP METHODS |
267 | */ | 267 | */ |
268 | 268 | ||
269 | /** | 269 | /** |
270 | Saves the contents of the AddressBook back to disk. | 270 | Saves the contents of the AddressBook back to disk. |
271 | */ | 271 | */ |
272 | void save(); | 272 | void save(); |
273 | 273 | ||
274 | /** | 274 | /** |
275 | Undos the last command using the undo stack. | 275 | Undos the last command using the undo stack. |
276 | */ | 276 | */ |
277 | void undo(); | 277 | void undo(); |
278 | 278 | ||
279 | /** | 279 | /** |
280 | Redos the last command that was undone, using the redo stack. | 280 | Redos the last command that was undone, using the redo stack. |
281 | */ | 281 | */ |
282 | void redo(); | 282 | void redo(); |
283 | 283 | ||
284 | /** | 284 | /** |
285 | Shows the edit dialog for the given uid. If the uid is QString::null, | 285 | Shows the edit dialog for the given uid. If the uid is QString::null, |
286 | the method will try to find a selected addressee in the view. | 286 | the method will try to find a selected addressee in the view. |
287 | */ | 287 | */ |
288 | void editContact( const QString &uid /*US = QString::null*/ ); | 288 | void editContact( const QString &uid /*US = QString::null*/ ); |
289 | //US added a second method without defaultparameter | 289 | //US added a second method without defaultparameter |
290 | void editContact2(); | 290 | void editContact2(); |
291 | 291 | ||
292 | /** | 292 | /** |
293 | Launches the configuration dialog. | 293 | Launches the configuration dialog. |
294 | */ | 294 | */ |
295 | void openConfigDialog(); | 295 | void openConfigDialog(); |
296 | 296 | ||
297 | /** | 297 | /** |
298 | Launches the ldap search dialog. | 298 | Launches the ldap search dialog. |
299 | */ | 299 | */ |
300 | void openLDAPDialog(); | 300 | void openLDAPDialog(); |
301 | 301 | ||
302 | /** | 302 | /** |
303 | Creates a KAddressBookPrinter, which will display the print | 303 | Creates a KAddressBookPrinter, which will display the print |
304 | dialog and do the printing. | 304 | dialog and do the printing. |
305 | */ | 305 | */ |
306 | void print(); | 306 | void print(); |
307 | 307 | ||
308 | /** | 308 | /** |
309 | Registers a new GUI client, so plugins can register its actions. | 309 | Registers a new GUI client, so plugins can register its actions. |
310 | */ | 310 | */ |
311 | void addGUIClient( KXMLGUIClient *client ); | 311 | void addGUIClient( KXMLGUIClient *client ); |
312 | 312 | ||
313 | signals: | 313 | signals: |
314 | void contactSelected( const QString &name ); | 314 | void contactSelected( const QString &name ); |
315 | void contactSelected( const QPixmap &pixmap ); | 315 | void contactSelected( const QPixmap &pixmap ); |
316 | public slots: | 316 | public slots: |
317 | void setDetailsVisible( bool visible ); | 317 | void setDetailsVisible( bool visible ); |
318 | void setDetailsToState(); | 318 | void setDetailsToState(); |
319 | private slots: | 319 | private slots: |
320 | void setJumpButtonBarVisible( bool visible ); | 320 | void setJumpButtonBarVisible( bool visible ); |
321 | void importFromOL(); | 321 | void importFromOL(); |
322 | void extensionModified( const KABC::Addressee::List &list ); | 322 | void extensionModified( const KABC::Addressee::List &list ); |
323 | void clipboardDataChanged(); | 323 | void clipboardDataChanged(); |
324 | void updateActionMenu(); | 324 | void updateActionMenu(); |
325 | void configureKeyBindings(); | 325 | void configureKeyBindings(); |
326 | void removeVoice(); | 326 | void removeVoice(); |
327 | #ifdef KAB_EMBEDDED | 327 | #ifdef KAB_EMBEDDED |
328 | void configureResources(); | 328 | void configureResources(); |
329 | #endif //KAB_EMBEDDED | 329 | #endif //KAB_EMBEDDED |
330 | 330 | ||
331 | void slotEditorDestroyed( const QString &uid ); | 331 | void slotEditorDestroyed( const QString &uid ); |
332 | void configurationChanged(); | 332 | void configurationChanged(); |
333 | void addressBookChanged(); | 333 | void addressBookChanged(); |
334 | 334 | ||
335 | private: | 335 | private: |
336 | void initGUI(); | 336 | void initGUI(); |
337 | void initActions(); | 337 | void initActions(); |
338 | 338 | ||
339 | AddresseeEditorDialog *createAddresseeEditorDialog( QWidget *parent, | 339 | AddresseeEditorDialog *createAddresseeEditorDialog( QWidget *parent, |
340 | const char *name = 0 ); | 340 | const char *name = 0 ); |
341 | 341 | ||
342 | KXMLGUIClient *mGUIClient; | 342 | KXMLGUIClient *mGUIClient; |
343 | 343 | ||
344 | KABC::AddressBook *mAddressBook; | 344 | KABC::AddressBook *mAddressBook; |
345 | 345 | ||
346 | ViewManager *mViewManager; | 346 | ViewManager *mViewManager; |
347 | // QSplitter *mDetailsSplitter; | 347 | // QSplitter *mDetailsSplitter; |
348 | KDGanttMinimizeSplitter *mExtensionBarSplitter; | 348 | KDGanttMinimizeSplitter *mExtensionBarSplitter; |
349 | ViewContainer *mDetails; | 349 | ViewContainer *mDetails; |
350 | KDGanttMinimizeSplitter* mMiniSplitter; | 350 | KDGanttMinimizeSplitter* mMiniSplitter; |
351 | XXPortManager *mXXPortManager; | 351 | XXPortManager *mXXPortManager; |
352 | JumpButtonBar *mJumpButtonBar; | 352 | JumpButtonBar *mJumpButtonBar; |
353 | IncSearchWidget *mIncSearchWidget; | 353 | IncSearchWidget *mIncSearchWidget; |
354 | ExtensionManager *mExtensionManager; | 354 | ExtensionManager *mExtensionManager; |
355 | 355 | ||
356 | KCMultiDialog *mConfigureDialog; | 356 | KCMultiDialog *mConfigureDialog; |
357 | 357 | ||
358 | #ifndef KAB_EMBEDDED | 358 | #ifndef KAB_EMBEDDED |
359 | |||
360 | KCMultiDialog *mConfigureDialog; | ||
361 | LDAPSearchDialog *mLdapSearchDialog; | 359 | LDAPSearchDialog *mLdapSearchDialog; |
362 | #endif //KAB_EMBEDDED | 360 | #endif //KAB_EMBEDDED |
363 | // QDict<AddresseeEditorDialog> mEditorDict; | 361 | // QDict<AddresseeEditorDialog> mEditorDict; |
364 | AddresseeEditorDialog *mEditorDialog; | 362 | AddresseeEditorDialog *mEditorDialog; |
365 | bool mReadWrite; | 363 | bool mReadWrite; |
366 | bool mModified; | 364 | bool mModified; |
367 | bool mIsPart; | 365 | bool mIsPart; |
368 | 366 | ||
369 | //US file menu | 367 | //US file menu |
370 | KAction *mActionMail; | 368 | KAction *mActionMail; |
371 | KAction* mActionPrint; | 369 | KAction* mActionPrint; |
372 | KAction* mActionNewContact; | 370 | KAction* mActionNewContact; |
373 | KAction *mActionSave; | 371 | KAction *mActionSave; |
374 | KAction *mActionEditAddressee; | 372 | KAction *mActionEditAddressee; |
375 | KAction *mActionMailVCard; | 373 | KAction *mActionMailVCard; |
376 | KAction *mActionQuit; | 374 | KAction *mActionQuit; |
377 | 375 | ||
378 | //US edit menu | 376 | //US edit menu |
379 | KAction *mActionCopy; | 377 | KAction *mActionCopy; |
380 | KAction *mActionCut; | 378 | KAction *mActionCut; |
381 | KAction *mActionPaste; | 379 | KAction *mActionPaste; |
382 | KAction *mActionSelectAll; | 380 | KAction *mActionSelectAll; |
383 | KAction *mActionUndo; | 381 | KAction *mActionUndo; |
384 | KAction *mActionRedo; | 382 | KAction *mActionRedo; |
385 | KAction *mActionDelete; | 383 | KAction *mActionDelete; |
386 | 384 | ||
387 | //US settings menu | 385 | //US settings menu |
388 | KAction *mActionConfigResources; | 386 | KAction *mActionConfigResources; |
389 | KAction *mActionConfigKAddressbook; | 387 | KAction *mActionConfigKAddressbook; |
390 | KAction *mActionConfigShortcuts; | 388 | KAction *mActionConfigShortcuts; |
391 | KAction *mActionConfigureToolbars; | 389 | KAction *mActionConfigureToolbars; |
392 | KAction *mActionKeyBindings; | 390 | KAction *mActionKeyBindings; |
393 | KToggleAction *mActionJumpBar; | 391 | KToggleAction *mActionJumpBar; |
394 | KToggleAction *mActionDetails; | 392 | KToggleAction *mActionDetails; |
395 | KAction *mActionWhoAmI; | 393 | KAction *mActionWhoAmI; |
396 | KAction *mActionCategories; | 394 | KAction *mActionCategories; |
397 | KAction *mActionAboutKAddressbook; | 395 | KAction *mActionAboutKAddressbook; |
398 | 396 | ||
399 | KAction *mActionDeleteView; | 397 | KAction *mActionDeleteView; |
400 | 398 | ||
401 | QPopupMenu *viewMenu; | 399 | QPopupMenu *viewMenu; |
402 | QPopupMenu *filterMenu; | 400 | QPopupMenu *filterMenu; |
403 | QPopupMenu *settingsMenu; | 401 | QPopupMenu *settingsMenu; |
404 | QPopupMenu *changeMenu; | 402 | QPopupMenu *changeMenu; |
405 | 403 | ||
406 | //US QAction *mActionSave; | 404 | //US QAction *mActionSave; |
407 | QPopupMenu *ImportMenu; | 405 | QPopupMenu *ImportMenu; |
408 | QPopupMenu *ExportMenu; | 406 | QPopupMenu *ExportMenu; |
409 | //LR additional methods | 407 | //LR additional methods |
410 | KAction *mActionRemoveVoice; | 408 | KAction *mActionRemoveVoice; |
411 | KAction * mActionImportOL; | 409 | KAction * mActionImportOL; |
412 | 410 | ||
413 | #ifndef KAB_EMBEDDED | 411 | #ifndef KAB_EMBEDDED |
414 | KAddressBookService *mAddressBookService; | 412 | KAddressBookService *mAddressBookService; |
415 | #endif //KAB_EMBEDDED | 413 | #endif //KAB_EMBEDDED |
416 | 414 | ||
417 | class KABCorePrivate; | 415 | class KABCorePrivate; |
418 | KABCorePrivate *d; | 416 | KABCorePrivate *d; |
419 | 417 | ||
420 | #ifdef KAB_EMBEDDED | 418 | #ifdef KAB_EMBEDDED |
421 | KAddressBookMain *mMainWindow; // should be the same like mGUIClient | 419 | KAddressBookMain *mMainWindow; // should be the same like mGUIClient |
422 | #endif //KAB_EMBEDDED | 420 | #endif //KAB_EMBEDDED |
423 | 421 | ||
424 | }; | 422 | }; |
425 | 423 | ||
426 | #endif | 424 | #endif |