author | zautrix <zautrix> | 2004-11-08 23:57:27 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-11-08 23:57:27 (UTC) |
commit | 48b2ccf53b1821598c6f18aab57e6e626047c262 (patch) (unidiff) | |
tree | 10e4f0123debd92ed06f037dc9212c88a6046bc3 | |
parent | a102330ef5acb7346aa811378eaf9dbcdeabd4c4 (diff) | |
download | kdepimpi-48b2ccf53b1821598c6f18aab57e6e626047c262.zip kdepimpi-48b2ccf53b1821598c6f18aab57e6e626047c262.tar.gz kdepimpi-48b2ccf53b1821598c6f18aab57e6e626047c262.tar.bz2 |
more menu cleanup in kapi
-rw-r--r-- | kaddressbook/kabcore.cpp | 29 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 1 |
2 files changed, 19 insertions, 11 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index a6fc677..3c97ce9 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -631,100 +631,96 @@ void KABCore::createAboutData() | |||
631 | "Michel Boyer de la Giroday LDAP Lookup\n" "michel@klaralvdalens-datakonsult.se\n" | 631 | "Michel Boyer de la Giroday LDAP Lookup\n" "michel@klaralvdalens-datakonsult.se\n" |
632 | "Steffen Hansen LDAP Lookup\nhansen@kde.org\n" | 632 | "Steffen Hansen LDAP Lookup\nhansen@kde.org\n" |
633 | #ifdef _WIN32_ | 633 | #ifdef _WIN32_ |
634 | "(c) 2004 Lutz Rogowski Import from OL\nrogowski@kde.org\n" | 634 | "(c) 2004 Lutz Rogowski Import from OL\nrogowski@kde.org\n" |
635 | #endif | 635 | #endif |
636 | ); | 636 | ); |
637 | } | 637 | } |
638 | 638 | ||
639 | void KABCore::setContactSelected( const QString &uid ) | 639 | void KABCore::setContactSelected( const QString &uid ) |
640 | { | 640 | { |
641 | KABC::Addressee addr = mAddressBook->findByUid( uid ); | 641 | KABC::Addressee addr = mAddressBook->findByUid( uid ); |
642 | if ( !mDetails->isHidden() ) | 642 | if ( !mDetails->isHidden() ) |
643 | mDetails->setAddressee( addr ); | 643 | mDetails->setAddressee( addr ); |
644 | 644 | ||
645 | if ( !addr.isEmpty() ) { | 645 | if ( !addr.isEmpty() ) { |
646 | emit contactSelected( addr.formattedName() ); | 646 | emit contactSelected( addr.formattedName() ); |
647 | KABC::Picture pic = addr.photo(); | 647 | KABC::Picture pic = addr.photo(); |
648 | if ( pic.isIntern() ) { | 648 | if ( pic.isIntern() ) { |
649 | //US emit contactSelected( pic.data() ); | 649 | //US emit contactSelected( pic.data() ); |
650 | //US instead use: | 650 | //US instead use: |
651 | QPixmap px; | 651 | QPixmap px; |
652 | if (pic.data().isNull() != true) | 652 | if (pic.data().isNull() != true) |
653 | { | 653 | { |
654 | px.convertFromImage(pic.data()); | 654 | px.convertFromImage(pic.data()); |
655 | } | 655 | } |
656 | 656 | ||
657 | emit contactSelected( px ); | 657 | emit contactSelected( px ); |
658 | } | 658 | } |
659 | } | 659 | } |
660 | 660 | ||
661 | 661 | ||
662 | mExtensionManager->setSelectionChanged(); | 662 | mExtensionManager->setSelectionChanged(); |
663 | 663 | ||
664 | // update the actions | 664 | // update the actions |
665 | bool selected = !uid.isEmpty(); | 665 | bool selected = !uid.isEmpty(); |
666 | 666 | ||
667 | if ( mReadWrite ) { | 667 | if ( mReadWrite ) { |
668 | mActionCut->setEnabled( selected ); | 668 | mActionCut->setEnabled( selected ); |
669 | mActionPaste->setEnabled( selected ); | 669 | mActionPaste->setEnabled( selected ); |
670 | } | 670 | } |
671 | 671 | ||
672 | mActionCopy->setEnabled( selected ); | 672 | mActionCopy->setEnabled( selected ); |
673 | mActionDelete->setEnabled( selected ); | 673 | mActionDelete->setEnabled( selected ); |
674 | mActionEditAddressee->setEnabled( selected ); | 674 | mActionEditAddressee->setEnabled( selected ); |
675 | mActionMail->setEnabled( selected ); | 675 | mActionMail->setEnabled( selected ); |
676 | mActionMailVCard->setEnabled( selected ); | 676 | mActionMailVCard->setEnabled( selected ); |
677 | //if (mActionBeam) | 677 | //if (mActionBeam) |
678 | //mActionBeam->setEnabled( selected ); | 678 | //mActionBeam->setEnabled( selected ); |
679 | |||
680 | if (mActionBeamVCard) | ||
681 | mActionBeamVCard->setEnabled( selected ); | ||
682 | |||
683 | mActionWhoAmI->setEnabled( selected ); | 679 | mActionWhoAmI->setEnabled( selected ); |
684 | } | 680 | } |
685 | 681 | ||
686 | void KABCore::sendMail() | 682 | void KABCore::sendMail() |
687 | { | 683 | { |
688 | sendMail( mViewManager->selectedEmails().join( ", " ) ); | 684 | sendMail( mViewManager->selectedEmails().join( ", " ) ); |
689 | } | 685 | } |
690 | 686 | ||
691 | void KABCore::sendMail( const QString& emaillist ) | 687 | void KABCore::sendMail( const QString& emaillist ) |
692 | { | 688 | { |
693 | // the parameter has the form "name1 <abc@aol.com>,name2 <abc@aol.com>;... " | 689 | // the parameter has the form "name1 <abc@aol.com>,name2 <abc@aol.com>;... " |
694 | if (emaillist.contains(",") > 0) | 690 | if (emaillist.contains(",") > 0) |
695 | ExternalAppHandler::instance()->mailToMultipleContacts( emaillist, QString::null ); | 691 | ExternalAppHandler::instance()->mailToMultipleContacts( emaillist, QString::null ); |
696 | else | 692 | else |
697 | ExternalAppHandler::instance()->mailToOneContact( emaillist ); | 693 | ExternalAppHandler::instance()->mailToOneContact( emaillist ); |
698 | } | 694 | } |
699 | 695 | ||
700 | 696 | ||
701 | 697 | ||
702 | void KABCore::mailVCard() | 698 | void KABCore::mailVCard() |
703 | { | 699 | { |
704 | QStringList uids = mViewManager->selectedUids(); | 700 | QStringList uids = mViewManager->selectedUids(); |
705 | if ( !uids.isEmpty() ) | 701 | if ( !uids.isEmpty() ) |
706 | mailVCard( uids ); | 702 | mailVCard( uids ); |
707 | } | 703 | } |
708 | 704 | ||
709 | void KABCore::mailVCard( const QStringList& uids ) | 705 | void KABCore::mailVCard( const QStringList& uids ) |
710 | { | 706 | { |
711 | QStringList urls; | 707 | QStringList urls; |
712 | 708 | ||
713 | // QString tmpdir = locateLocal("tmp", KGlobal::getAppName()); | 709 | // QString tmpdir = locateLocal("tmp", KGlobal::getAppName()); |
714 | 710 | ||
715 | QString dirName = "/tmp/" + KApplication::randomString( 8 ); | 711 | QString dirName = "/tmp/" + KApplication::randomString( 8 ); |
716 | 712 | ||
717 | 713 | ||
718 | 714 | ||
719 | QDir().mkdir( dirName, true ); | 715 | QDir().mkdir( dirName, true ); |
720 | 716 | ||
721 | for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { | 717 | for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { |
722 | KABC::Addressee a = mAddressBook->findByUid( *it ); | 718 | KABC::Addressee a = mAddressBook->findByUid( *it ); |
723 | 719 | ||
724 | if ( a.isEmpty() ) | 720 | if ( a.isEmpty() ) |
725 | continue; | 721 | continue; |
726 | 722 | ||
727 | QString name = a.givenName() + "_" + a.familyName() + ".vcf"; | 723 | QString name = a.givenName() + "_" + a.familyName() + ".vcf"; |
728 | 724 | ||
729 | QString fileName = dirName + "/" + name; | 725 | QString fileName = dirName + "/" + name; |
730 | 726 | ||
@@ -823,99 +819,105 @@ void KABCore::export2phone() | |||
823 | else | 819 | else |
824 | return; | 820 | return; |
825 | if ( uids.isEmpty() ) | 821 | if ( uids.isEmpty() ) |
826 | return; | 822 | return; |
827 | // qDebug("count %d ", uids.count()); | 823 | // qDebug("count %d ", uids.count()); |
828 | 824 | ||
829 | KAex2phonePrefs ex2phone; | 825 | KAex2phonePrefs ex2phone; |
830 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); | 826 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); |
831 | ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); | 827 | ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); |
832 | ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); | 828 | ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); |
833 | 829 | ||
834 | if ( !ex2phone.exec() ) { | 830 | if ( !ex2phone.exec() ) { |
835 | return; | 831 | return; |
836 | } | 832 | } |
837 | KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); | 833 | KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); |
838 | KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); | 834 | KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); |
839 | KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); | 835 | KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); |
840 | 836 | ||
841 | 837 | ||
842 | PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, | 838 | PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, |
843 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, | 839 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, |
844 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); | 840 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); |
845 | 841 | ||
846 | QString fileName = getPhoneFile(); | 842 | QString fileName = getPhoneFile(); |
847 | if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) ) | 843 | if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) ) |
848 | return; | 844 | return; |
849 | 845 | ||
850 | message(i18n("Exporting to phone...")); | 846 | message(i18n("Exporting to phone...")); |
851 | QTimer::singleShot( 1, this , SLOT ( writeToPhone())); | 847 | QTimer::singleShot( 1, this , SLOT ( writeToPhone())); |
852 | 848 | ||
853 | } | 849 | } |
854 | QString KABCore::getPhoneFile() | 850 | QString KABCore::getPhoneFile() |
855 | { | 851 | { |
856 | #ifdef DESKTOP_VERSION | 852 | #ifdef DESKTOP_VERSION |
857 | return locateLocal("tmp", "phonefile.vcf"); | 853 | return locateLocal("tmp", "phonefile.vcf"); |
858 | #else | 854 | #else |
859 | return "/tmp/phonefile.vcf"; | 855 | return "/tmp/phonefile.vcf"; |
860 | #endif | 856 | #endif |
861 | 857 | ||
862 | } | 858 | } |
863 | void KABCore::writeToPhone( ) | 859 | void KABCore::writeToPhone( ) |
864 | { | 860 | { |
865 | if ( PhoneAccess::writeToPhone( getPhoneFile() ) ) | 861 | if ( PhoneAccess::writeToPhone( getPhoneFile() ) ) |
866 | message(i18n("Export to phone finished!")); | 862 | message(i18n("Export to phone finished!")); |
867 | else | 863 | else |
868 | qDebug(i18n("Error exporting to phone")); | 864 | qDebug(i18n("Error exporting to phone")); |
869 | } | 865 | } |
870 | void KABCore::beamVCard() | 866 | void KABCore::beamVCard() |
871 | { | 867 | { |
872 | QStringList uids = mViewManager->selectedUids(); | 868 | QStringList uids; |
873 | if ( !uids.isEmpty() ) | 869 | XXPortSelectDialog dlg( this, false, this ); |
870 | if ( dlg.exec() ) | ||
871 | uids = dlg.uids(); | ||
872 | else | ||
873 | return; | ||
874 | if ( uids.isEmpty() ) | ||
875 | return; | ||
874 | beamVCard( uids ); | 876 | beamVCard( uids ); |
875 | } | 877 | } |
876 | 878 | ||
877 | 879 | ||
878 | void KABCore::beamVCard(const QStringList& uids) | 880 | void KABCore::beamVCard(const QStringList& uids) |
879 | { | 881 | { |
880 | 882 | ||
881 | // LR: we should use the /tmp dir on the Zaurus, | 883 | // LR: we should use the /tmp dir on the Zaurus, |
882 | // because: /tmp = RAM, (HOME)/kdepim = flash memory | 884 | // because: /tmp = RAM, (HOME)/kdepim = flash memory |
883 | 885 | ||
884 | #ifdef DESKTOP_VERSION | 886 | #ifdef DESKTOP_VERSION |
885 | QString fileName = locateLocal("tmp", "kapibeamfile.vcf"); | 887 | QString fileName = locateLocal("tmp", "kapibeamfile.vcf"); |
886 | #else | 888 | #else |
887 | QString fileName = "/tmp/kapibeamfile.vcf"; | 889 | QString fileName = "/tmp/kapibeamfile.vcf"; |
888 | #endif | 890 | #endif |
889 | 891 | ||
890 | KABC::VCardConverter converter; | 892 | KABC::VCardConverter converter; |
891 | QString description; | 893 | QString description; |
892 | QString datastream; | 894 | QString datastream; |
893 | for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { | 895 | for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { |
894 | KABC::Addressee a = mAddressBook->findByUid( *it ); | 896 | KABC::Addressee a = mAddressBook->findByUid( *it ); |
895 | 897 | ||
896 | if ( a.isEmpty() ) | 898 | if ( a.isEmpty() ) |
897 | continue; | 899 | continue; |
898 | 900 | ||
899 | if (description.isEmpty()) | 901 | if (description.isEmpty()) |
900 | description = a.formattedName(); | 902 | description = a.formattedName(); |
901 | 903 | ||
902 | QString vcard; | 904 | QString vcard; |
903 | converter.addresseeToVCard( a, vcard ); | 905 | converter.addresseeToVCard( a, vcard ); |
904 | int start = 0; | 906 | int start = 0; |
905 | int next; | 907 | int next; |
906 | while ( (next = vcard.find("TYPE=", start) )>= 0 ) { | 908 | while ( (next = vcard.find("TYPE=", start) )>= 0 ) { |
907 | int semi = vcard.find(";", next); | 909 | int semi = vcard.find(";", next); |
908 | int dopp = vcard.find(":", next); | 910 | int dopp = vcard.find(":", next); |
909 | int sep; | 911 | int sep; |
910 | if ( semi < dopp && semi >= 0 ) | 912 | if ( semi < dopp && semi >= 0 ) |
911 | sep = semi ; | 913 | sep = semi ; |
912 | else | 914 | else |
913 | sep = dopp; | 915 | sep = dopp; |
914 | datastream +=vcard.mid( start, next - start); | 916 | datastream +=vcard.mid( start, next - start); |
915 | datastream +=vcard.mid( next+5,sep -next -5 ).upper(); | 917 | datastream +=vcard.mid( next+5,sep -next -5 ).upper(); |
916 | start = sep; | 918 | start = sep; |
917 | } | 919 | } |
918 | datastream += vcard.mid( start,vcard.length() ); | 920 | datastream += vcard.mid( start,vcard.length() ); |
919 | } | 921 | } |
920 | #ifndef DESKTOP_VERSION | 922 | #ifndef DESKTOP_VERSION |
921 | QFile outFile(fileName); | 923 | QFile outFile(fileName); |
@@ -1651,96 +1653,97 @@ AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent, | |||
1651 | 1653 | ||
1652 | void KABCore::slotEditorDestroyed( const QString &uid ) | 1654 | void KABCore::slotEditorDestroyed( const QString &uid ) |
1653 | { | 1655 | { |
1654 | //mEditorDict.remove( uid ); | 1656 | //mEditorDict.remove( uid ); |
1655 | } | 1657 | } |
1656 | 1658 | ||
1657 | void KABCore::initGUI() | 1659 | void KABCore::initGUI() |
1658 | { | 1660 | { |
1659 | #ifndef KAB_EMBEDDED | 1661 | #ifndef KAB_EMBEDDED |
1660 | QHBoxLayout *topLayout = new QHBoxLayout( this ); | 1662 | QHBoxLayout *topLayout = new QHBoxLayout( this ); |
1661 | topLayout->setSpacing( KDialogBase::spacingHint() ); | 1663 | topLayout->setSpacing( KDialogBase::spacingHint() ); |
1662 | 1664 | ||
1663 | mExtensionBarSplitter = new QSplitter( this ); | 1665 | mExtensionBarSplitter = new QSplitter( this ); |
1664 | mExtensionBarSplitter->setOrientation( Qt::Vertical ); | 1666 | mExtensionBarSplitter->setOrientation( Qt::Vertical ); |
1665 | 1667 | ||
1666 | mDetailsSplitter = new QSplitter( mExtensionBarSplitter ); | 1668 | mDetailsSplitter = new QSplitter( mExtensionBarSplitter ); |
1667 | 1669 | ||
1668 | QVBox *viewSpace = new QVBox( mDetailsSplitter ); | 1670 | QVBox *viewSpace = new QVBox( mDetailsSplitter ); |
1669 | mIncSearchWidget = new IncSearchWidget( viewSpace ); | 1671 | mIncSearchWidget = new IncSearchWidget( viewSpace ); |
1670 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), | 1672 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), |
1671 | SLOT( incrementalSearch( const QString& ) ) ); | 1673 | SLOT( incrementalSearch( const QString& ) ) ); |
1672 | 1674 | ||
1673 | mViewManager = new ViewManager( this, viewSpace ); | 1675 | mViewManager = new ViewManager( this, viewSpace ); |
1674 | viewSpace->setStretchFactor( mViewManager, 1 ); | 1676 | viewSpace->setStretchFactor( mViewManager, 1 ); |
1675 | 1677 | ||
1676 | mDetails = new ViewContainer( mDetailsSplitter ); | 1678 | mDetails = new ViewContainer( mDetailsSplitter ); |
1677 | 1679 | ||
1678 | mJumpButtonBar = new JumpButtonBar( this, this ); | 1680 | mJumpButtonBar = new JumpButtonBar( this, this ); |
1679 | 1681 | ||
1680 | mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); | 1682 | mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); |
1681 | 1683 | ||
1682 | topLayout->addWidget( mExtensionBarSplitter ); | 1684 | topLayout->addWidget( mExtensionBarSplitter ); |
1683 | topLayout->setStretchFactor( mExtensionBarSplitter, 100 ); | 1685 | topLayout->setStretchFactor( mExtensionBarSplitter, 100 ); |
1684 | topLayout->addWidget( mJumpButtonBar ); | 1686 | topLayout->addWidget( mJumpButtonBar ); |
1685 | topLayout->setStretchFactor( mJumpButtonBar, 1 ); | 1687 | topLayout->setStretchFactor( mJumpButtonBar, 1 ); |
1686 | 1688 | ||
1687 | mXXPortManager = new XXPortManager( this, this ); | 1689 | mXXPortManager = new XXPortManager( this, this ); |
1688 | 1690 | ||
1689 | #else //KAB_EMBEDDED | 1691 | #else //KAB_EMBEDDED |
1690 | //US initialize viewMenu before settingup viewmanager. | 1692 | //US initialize viewMenu before settingup viewmanager. |
1691 | // Viewmanager needs this menu to plugin submenues. | 1693 | // Viewmanager needs this menu to plugin submenues. |
1692 | viewMenu = new QPopupMenu( this ); | 1694 | viewMenu = new QPopupMenu( this ); |
1693 | settingsMenu = new QPopupMenu( this ); | 1695 | settingsMenu = new QPopupMenu( this ); |
1694 | //filterMenu = new QPopupMenu( this ); | 1696 | //filterMenu = new QPopupMenu( this ); |
1695 | ImportMenu = new QPopupMenu( this ); | 1697 | ImportMenu = new QPopupMenu( this ); |
1696 | ExportMenu = new QPopupMenu( this ); | 1698 | ExportMenu = new QPopupMenu( this ); |
1697 | syncMenu = new QPopupMenu( this ); | 1699 | syncMenu = new QPopupMenu( this ); |
1698 | changeMenu= new QPopupMenu( this ); | 1700 | changeMenu= new QPopupMenu( this ); |
1701 | beamMenu= new QPopupMenu( this ); | ||
1699 | 1702 | ||
1700 | //US since we have no splitter for the embedded system, setup | 1703 | //US since we have no splitter for the embedded system, setup |
1701 | // a layout with two frames. One left and one right. | 1704 | // a layout with two frames. One left and one right. |
1702 | 1705 | ||
1703 | QBoxLayout *topLayout; | 1706 | QBoxLayout *topLayout; |
1704 | 1707 | ||
1705 | // = new QHBoxLayout( this ); | 1708 | // = new QHBoxLayout( this ); |
1706 | // QBoxLayout *topLayout = (QBoxLayout*)layout(); | 1709 | // QBoxLayout *topLayout = (QBoxLayout*)layout(); |
1707 | 1710 | ||
1708 | // QWidget *mainBox = new QWidget( this ); | 1711 | // QWidget *mainBox = new QWidget( this ); |
1709 | // QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox); | 1712 | // QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox); |
1710 | 1713 | ||
1711 | #ifdef DESKTOP_VERSION | 1714 | #ifdef DESKTOP_VERSION |
1712 | topLayout = new QHBoxLayout( this ); | 1715 | topLayout = new QHBoxLayout( this ); |
1713 | 1716 | ||
1714 | 1717 | ||
1715 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); | 1718 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); |
1716 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); | 1719 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); |
1717 | 1720 | ||
1718 | topLayout->addWidget(mMiniSplitter ); | 1721 | topLayout->addWidget(mMiniSplitter ); |
1719 | 1722 | ||
1720 | mExtensionBarSplitter = new KDGanttMinimizeSplitter( Qt::Vertical,mMiniSplitter ); | 1723 | mExtensionBarSplitter = new KDGanttMinimizeSplitter( Qt::Vertical,mMiniSplitter ); |
1721 | mExtensionBarSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); | 1724 | mExtensionBarSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); |
1722 | mViewManager = new ViewManager( this, mExtensionBarSplitter ); | 1725 | mViewManager = new ViewManager( this, mExtensionBarSplitter ); |
1723 | mDetails = new ViewContainer( mMiniSplitter ); | 1726 | mDetails = new ViewContainer( mMiniSplitter ); |
1724 | mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); | 1727 | mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); |
1725 | #else | 1728 | #else |
1726 | if ( QApplication::desktop()->width() > 480 ) { | 1729 | if ( QApplication::desktop()->width() > 480 ) { |
1727 | topLayout = new QHBoxLayout( this ); | 1730 | topLayout = new QHBoxLayout( this ); |
1728 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); | 1731 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); |
1729 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); | 1732 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); |
1730 | } else { | 1733 | } else { |
1731 | 1734 | ||
1732 | topLayout = new QHBoxLayout( this ); | 1735 | topLayout = new QHBoxLayout( this ); |
1733 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this); | 1736 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this); |
1734 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); | 1737 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); |
1735 | } | 1738 | } |
1736 | 1739 | ||
1737 | topLayout->addWidget(mMiniSplitter ); | 1740 | topLayout->addWidget(mMiniSplitter ); |
1738 | mViewManager = new ViewManager( this, mMiniSplitter ); | 1741 | mViewManager = new ViewManager( this, mMiniSplitter ); |
1739 | mDetails = new ViewContainer( mMiniSplitter ); | 1742 | mDetails = new ViewContainer( mMiniSplitter ); |
1740 | 1743 | ||
1741 | 1744 | ||
1742 | mExtensionManager = new ExtensionManager( this, mMiniSplitter ); | 1745 | mExtensionManager = new ExtensionManager( this, mMiniSplitter ); |
1743 | #endif | 1746 | #endif |
1744 | //eh->hide(); | 1747 | //eh->hide(); |
1745 | // topLayout->addWidget(mExtensionManager ); | 1748 | // topLayout->addWidget(mExtensionManager ); |
1746 | 1749 | ||
@@ -1816,97 +1819,97 @@ void KABCore::initGUI() | |||
1816 | 1819 | ||
1817 | // mMainWindow->getIconToolBar()->raise(); | 1820 | // mMainWindow->getIconToolBar()->raise(); |
1818 | 1821 | ||
1819 | #endif //KAB_EMBEDDED | 1822 | #endif //KAB_EMBEDDED |
1820 | 1823 | ||
1821 | } | 1824 | } |
1822 | void KABCore::initActions() | 1825 | void KABCore::initActions() |
1823 | { | 1826 | { |
1824 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); | 1827 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); |
1825 | 1828 | ||
1826 | #ifndef KAB_EMBEDDED | 1829 | #ifndef KAB_EMBEDDED |
1827 | connect( QApplication::clipboard(), SIGNAL( dataChanged() ), | 1830 | connect( QApplication::clipboard(), SIGNAL( dataChanged() ), |
1828 | SLOT( clipboardDataChanged() ) ); | 1831 | SLOT( clipboardDataChanged() ) ); |
1829 | #endif //KAB_EMBEDDED | 1832 | #endif //KAB_EMBEDDED |
1830 | 1833 | ||
1831 | // file menu | 1834 | // file menu |
1832 | if ( mIsPart ) { | 1835 | if ( mIsPart ) { |
1833 | mActionMail = new KAction( i18n( "&Mail" ), "mail_generic", 0, this, | 1836 | mActionMail = new KAction( i18n( "&Mail" ), "mail_generic", 0, this, |
1834 | SLOT( sendMail() ), actionCollection(), | 1837 | SLOT( sendMail() ), actionCollection(), |
1835 | "kaddressbook_mail" ); | 1838 | "kaddressbook_mail" ); |
1836 | mActionPrint = new KAction( i18n( "&Print" ), "fileprint", CTRL + Key_P, this, | 1839 | mActionPrint = new KAction( i18n( "&Print" ), "fileprint", CTRL + Key_P, this, |
1837 | SLOT( print() ), actionCollection(), "kaddressbook_print" ); | 1840 | SLOT( print() ), actionCollection(), "kaddressbook_print" ); |
1838 | 1841 | ||
1839 | } else { | 1842 | } else { |
1840 | mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() ); | 1843 | mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() ); |
1841 | mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() ); | 1844 | mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() ); |
1842 | } | 1845 | } |
1843 | 1846 | ||
1844 | 1847 | ||
1845 | mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this, | 1848 | mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this, |
1846 | SLOT( save() ), actionCollection(), "file_sync" ); | 1849 | SLOT( save() ), actionCollection(), "file_sync" ); |
1847 | 1850 | ||
1848 | mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this, | 1851 | mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this, |
1849 | SLOT( newContact() ), actionCollection(), "file_new_contact" ); | 1852 | SLOT( newContact() ), actionCollection(), "file_new_contact" ); |
1850 | 1853 | ||
1851 | mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0, | 1854 | mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0, |
1852 | this, SLOT( mailVCard() ), | 1855 | this, SLOT( mailVCard() ), |
1853 | actionCollection(), "file_mail_vcard"); | 1856 | actionCollection(), "file_mail_vcard"); |
1854 | 1857 | ||
1855 | mActionExport2phone = new KAction( i18n( "Export to phone" ), "ex2phone", 0, this, | 1858 | mActionExport2phone = new KAction( i18n( "Export to phone" ), "ex2phone", 0, this, |
1856 | SLOT( export2phone() ), actionCollection(), | 1859 | SLOT( export2phone() ), actionCollection(), |
1857 | "kaddressbook_ex2phone" ); | 1860 | "kaddressbook_ex2phone" ); |
1858 | 1861 | ||
1859 | mActionBeamVCard = 0; | 1862 | mActionBeamVCard = 0; |
1860 | mActionBeam = 0; | 1863 | mActionBeam = 0; |
1861 | 1864 | ||
1862 | #ifndef DESKTOP_VERSION | 1865 | #ifndef DESKTOP_VERSION |
1863 | if ( Ir::supported() ) { | 1866 | if ( Ir::supported() ) { |
1864 | mActionBeamVCard = new KAction( i18n( "Beam selected v&Card(s)" ), "beam", 0, this, | 1867 | mActionBeamVCard = new KAction( i18n( "Beam v&Card(s)..." ), "beam", 0, this, |
1865 | SLOT( beamVCard() ), actionCollection(), | 1868 | SLOT( beamVCard() ), actionCollection(), |
1866 | "kaddressbook_beam_vcard" ); | 1869 | "kaddressbook_beam_vcard" ); |
1867 | 1870 | ||
1868 | mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this, | 1871 | mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this, |
1869 | SLOT( beamMySelf() ), actionCollection(), | 1872 | SLOT( beamMySelf() ), actionCollection(), |
1870 | "kaddressbook_beam_myself" ); | 1873 | "kaddressbook_beam_myself" ); |
1871 | } | 1874 | } |
1872 | #endif | 1875 | #endif |
1873 | 1876 | ||
1874 | mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0, | 1877 | mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0, |
1875 | this, SLOT( editContact2() ), | 1878 | this, SLOT( editContact2() ), |
1876 | actionCollection(), "file_properties" ); | 1879 | actionCollection(), "file_properties" ); |
1877 | 1880 | ||
1878 | #ifdef KAB_EMBEDDED | 1881 | #ifdef KAB_EMBEDDED |
1879 | // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() ); | 1882 | // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() ); |
1880 | mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0, | 1883 | mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0, |
1881 | mMainWindow, SLOT( exit() ), | 1884 | mMainWindow, SLOT( exit() ), |
1882 | actionCollection(), "quit" ); | 1885 | actionCollection(), "quit" ); |
1883 | #endif //KAB_EMBEDDED | 1886 | #endif //KAB_EMBEDDED |
1884 | 1887 | ||
1885 | // edit menu | 1888 | // edit menu |
1886 | if ( mIsPart ) { | 1889 | if ( mIsPart ) { |
1887 | mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this, | 1890 | mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this, |
1888 | SLOT( copyContacts() ), actionCollection(), | 1891 | SLOT( copyContacts() ), actionCollection(), |
1889 | "kaddressbook_copy" ); | 1892 | "kaddressbook_copy" ); |
1890 | mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this, | 1893 | mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this, |
1891 | SLOT( cutContacts() ), actionCollection(), | 1894 | SLOT( cutContacts() ), actionCollection(), |
1892 | "kaddressbook_cut" ); | 1895 | "kaddressbook_cut" ); |
1893 | mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this, | 1896 | mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this, |
1894 | SLOT( pasteContacts() ), actionCollection(), | 1897 | SLOT( pasteContacts() ), actionCollection(), |
1895 | "kaddressbook_paste" ); | 1898 | "kaddressbook_paste" ); |
1896 | mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this, | 1899 | mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this, |
1897 | SLOT( selectAllContacts() ), actionCollection(), | 1900 | SLOT( selectAllContacts() ), actionCollection(), |
1898 | "kaddressbook_select_all" ); | 1901 | "kaddressbook_select_all" ); |
1899 | mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this, | 1902 | mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this, |
1900 | SLOT( undo() ), actionCollection(), | 1903 | SLOT( undo() ), actionCollection(), |
1901 | "kaddressbook_undo" ); | 1904 | "kaddressbook_undo" ); |
1902 | mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z, | 1905 | mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z, |
1903 | this, SLOT( redo() ), actionCollection(), | 1906 | this, SLOT( redo() ), actionCollection(), |
1904 | "kaddressbook_redo" ); | 1907 | "kaddressbook_redo" ); |
1905 | } else { | 1908 | } else { |
1906 | mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() ); | 1909 | mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() ); |
1907 | mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() ); | 1910 | mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() ); |
1908 | mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() ); | 1911 | mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() ); |
1909 | mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() ); | 1912 | mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() ); |
1910 | mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() ); | 1913 | mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() ); |
1911 | mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() ); | 1914 | mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() ); |
1912 | } | 1915 | } |
@@ -2058,145 +2061,149 @@ void KABCore::addActionsManually() | |||
2058 | mb->insertItem( i18n("&Help"), helpMenu ); | 2061 | mb->insertItem( i18n("&Help"), helpMenu ); |
2059 | mIncSearchWidget = new IncSearchWidget( tb ); | 2062 | mIncSearchWidget = new IncSearchWidget( tb ); |
2060 | // tb->insertWidget(-1, 0, mIncSearchWidget); | 2063 | // tb->insertWidget(-1, 0, mIncSearchWidget); |
2061 | #ifndef DESKTOP_VERSION | 2064 | #ifndef DESKTOP_VERSION |
2062 | } else { | 2065 | } else { |
2063 | //US setup toolbar | 2066 | //US setup toolbar |
2064 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); | 2067 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); |
2065 | QPopupMenu *popupBarTB = new QPopupMenu( this ); | 2068 | QPopupMenu *popupBarTB = new QPopupMenu( this ); |
2066 | menuBarTB->insertItem( "ME", popupBarTB); | 2069 | menuBarTB->insertItem( "ME", popupBarTB); |
2067 | tb->insertWidget(-1, 0, menuBarTB); | 2070 | tb->insertWidget(-1, 0, menuBarTB); |
2068 | mIncSearchWidget = new IncSearchWidget( tb ); | 2071 | mIncSearchWidget = new IncSearchWidget( tb ); |
2069 | 2072 | ||
2070 | tb->enableMoving(false); | 2073 | tb->enableMoving(false); |
2071 | popupBarTB->insertItem( i18n("&File"), fileMenu ); | 2074 | popupBarTB->insertItem( i18n("&File"), fileMenu ); |
2072 | popupBarTB->insertItem( i18n("&Edit"), editMenu ); | 2075 | popupBarTB->insertItem( i18n("&Edit"), editMenu ); |
2073 | popupBarTB->insertItem( i18n("&View"), viewMenu ); | 2076 | popupBarTB->insertItem( i18n("&View"), viewMenu ); |
2074 | popupBarTB->insertItem( i18n("&Settings"), settingsMenu ); | 2077 | popupBarTB->insertItem( i18n("&Settings"), settingsMenu ); |
2075 | popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); | 2078 | popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); |
2076 | mViewManager->getFilterAction()->plug ( popupBarTB); | 2079 | mViewManager->getFilterAction()->plug ( popupBarTB); |
2077 | //popupBarTB->insertItem( i18n("&Change selected"), changeMenu ); | 2080 | //popupBarTB->insertItem( i18n("&Change selected"), changeMenu ); |
2078 | popupBarTB->insertItem( i18n("&Help"), helpMenu ); | 2081 | popupBarTB->insertItem( i18n("&Help"), helpMenu ); |
2079 | if (QApplication::desktop()->width() > 320 ) { | 2082 | if (QApplication::desktop()->width() > 320 ) { |
2080 | // mViewManager->getFilterAction()->plug ( tb); | 2083 | // mViewManager->getFilterAction()->plug ( tb); |
2081 | } | 2084 | } |
2082 | } | 2085 | } |
2083 | #endif | 2086 | #endif |
2084 | // mActionQuit->plug ( mMainWindow->toolBar()); | 2087 | // mActionQuit->plug ( mMainWindow->toolBar()); |
2085 | 2088 | ||
2086 | 2089 | ||
2087 | 2090 | ||
2088 | //US Now connect the actions with the menue entries. | 2091 | //US Now connect the actions with the menue entries. |
2089 | mActionPrint->plug( fileMenu ); | 2092 | mActionPrint->plug( fileMenu ); |
2090 | mActionMail->plug( fileMenu ); | 2093 | mActionMail->plug( fileMenu ); |
2091 | fileMenu->insertSeparator(); | 2094 | fileMenu->insertSeparator(); |
2092 | 2095 | ||
2093 | mActionNewContact->plug( fileMenu ); | 2096 | mActionNewContact->plug( fileMenu ); |
2094 | mActionNewContact->plug( tb ); | 2097 | mActionNewContact->plug( tb ); |
2095 | 2098 | ||
2096 | mActionEditAddressee->plug( fileMenu ); | 2099 | mActionEditAddressee->plug( fileMenu ); |
2097 | // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || | 2100 | // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || |
2098 | // (!KABPrefs::instance()->mMultipleViewsAtOnce )) | 2101 | // (!KABPrefs::instance()->mMultipleViewsAtOnce )) |
2099 | mActionEditAddressee->plug( tb ); | 2102 | mActionEditAddressee->plug( tb ); |
2100 | 2103 | ||
2101 | fileMenu->insertSeparator(); | 2104 | fileMenu->insertSeparator(); |
2102 | mActionSave->plug( fileMenu ); | 2105 | mActionSave->plug( fileMenu ); |
2103 | fileMenu->insertItem( "&Import", ImportMenu ); | 2106 | fileMenu->insertItem( "&Import", ImportMenu ); |
2104 | fileMenu->insertItem( "&Export", ExportMenu ); | 2107 | fileMenu->insertItem( "&Export", ExportMenu ); |
2105 | fileMenu->insertItem( i18n("&Change"), changeMenu ); | 2108 | fileMenu->insertItem( i18n("&Change"), changeMenu ); |
2109 | fileMenu->insertItem( i18n("&Beam"), beamMenu ); | ||
2106 | fileMenu->insertSeparator(); | 2110 | fileMenu->insertSeparator(); |
2107 | mActionMailVCard->plug( fileMenu ); | 2111 | mActionMailVCard->plug( fileMenu ); |
2108 | #ifndef DESKTOP_VERSION | 2112 | #ifndef DESKTOP_VERSION |
2109 | if ( Ir::supported() ) mActionBeamVCard->plug( fileMenu ); | 2113 | if ( Ir::supported() ) mActionBR->plug( beamMenu ); |
2110 | if ( Ir::supported() ) mActionBeam->plug(fileMenu ); | 2114 | if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu ); |
2115 | if ( Ir::supported() ) mActionBeam->plug( beamMenu ); | ||
2111 | #endif | 2116 | #endif |
2112 | fileMenu->insertSeparator(); | 2117 | fileMenu->insertSeparator(); |
2113 | mActionQuit->plug( fileMenu ); | 2118 | mActionQuit->plug( fileMenu ); |
2114 | #ifdef _WIN32_ | 2119 | #ifdef _WIN32_ |
2115 | mActionImportOL->plug( ImportMenu ); | 2120 | mActionImportOL->plug( ImportMenu ); |
2116 | #endif | 2121 | #endif |
2117 | // edit menu | 2122 | // edit menu |
2118 | mActionUndo->plug( editMenu ); | 2123 | mActionUndo->plug( editMenu ); |
2119 | mActionRedo->plug( editMenu ); | 2124 | mActionRedo->plug( editMenu ); |
2120 | editMenu->insertSeparator(); | 2125 | editMenu->insertSeparator(); |
2121 | mActionCut->plug( editMenu ); | 2126 | mActionCut->plug( editMenu ); |
2122 | mActionCopy->plug( editMenu ); | 2127 | mActionCopy->plug( editMenu ); |
2123 | mActionPaste->plug( editMenu ); | 2128 | mActionPaste->plug( editMenu ); |
2124 | mActionDelete->plug( editMenu ); | 2129 | mActionDelete->plug( editMenu ); |
2125 | editMenu->insertSeparator(); | 2130 | editMenu->insertSeparator(); |
2126 | mActionSelectAll->plug( editMenu ); | 2131 | mActionSelectAll->plug( editMenu ); |
2127 | 2132 | ||
2128 | mActionRemoveVoice->plug( changeMenu ); | 2133 | mActionRemoveVoice->plug( changeMenu ); |
2129 | // settings menu | 2134 | // settings menu |
2130 | //US special menuentry to configure the addressbook resources. On KDE | 2135 | //US special menuentry to configure the addressbook resources. On KDE |
2131 | // you do that through the control center !!! | 2136 | // you do that through the control center !!! |
2132 | mActionConfigResources->plug( settingsMenu ); | 2137 | mActionConfigResources->plug( settingsMenu ); |
2133 | settingsMenu->insertSeparator(); | 2138 | settingsMenu->insertSeparator(); |
2134 | 2139 | ||
2135 | mActionConfigKAddressbook->plug( settingsMenu ); | 2140 | mActionConfigKAddressbook->plug( settingsMenu ); |
2136 | 2141 | ||
2137 | if ( mIsPart ) { | 2142 | if ( mIsPart ) { |
2138 | //US not implemented yet | 2143 | //US not implemented yet |
2139 | //mActionConfigShortcuts->plug( settingsMenu ); | 2144 | //mActionConfigShortcuts->plug( settingsMenu ); |
2140 | //mActionConfigureToolbars->plug( settingsMenu ); | 2145 | //mActionConfigureToolbars->plug( settingsMenu ); |
2141 | 2146 | ||
2142 | } else { | 2147 | } else { |
2143 | //US not implemented yet | 2148 | //US not implemented yet |
2144 | //mActionKeyBindings->plug( settingsMenu ); | 2149 | //mActionKeyBindings->plug( settingsMenu ); |
2145 | } | 2150 | } |
2146 | 2151 | ||
2147 | settingsMenu->insertSeparator(); | 2152 | settingsMenu->insertSeparator(); |
2148 | 2153 | ||
2149 | mActionJumpBar->plug( settingsMenu ); | 2154 | mActionJumpBar->plug( settingsMenu ); |
2150 | mActionDetails->plug( settingsMenu ); | 2155 | mActionDetails->plug( settingsMenu ); |
2151 | //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) | 2156 | //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) |
2152 | mActionDetails->plug( tb ); | 2157 | mActionDetails->plug( tb ); |
2153 | settingsMenu->insertSeparator(); | 2158 | settingsMenu->insertSeparator(); |
2154 | mActionBR->plug(settingsMenu ); | 2159 | #ifndef DESKTOP_VERSION |
2160 | if ( Ir::supported() ) mActionBR->plug(settingsMenu ); | ||
2161 | #endif | ||
2155 | settingsMenu->insertSeparator(); | 2162 | settingsMenu->insertSeparator(); |
2156 | 2163 | ||
2157 | mActionWhoAmI->plug( settingsMenu ); | 2164 | mActionWhoAmI->plug( settingsMenu ); |
2158 | mActionEditCategories->plug( settingsMenu ); | 2165 | mActionEditCategories->plug( settingsMenu ); |
2159 | mActionEditCategories->plug( changeMenu ); | 2166 | mActionEditCategories->plug( changeMenu ); |
2160 | mActionCategories->plug( changeMenu ); | 2167 | mActionCategories->plug( changeMenu ); |
2161 | mActionManageCategories->plug( changeMenu ); | 2168 | mActionManageCategories->plug( changeMenu ); |
2162 | 2169 | ||
2163 | mActionCategories->plug( settingsMenu ); | 2170 | mActionCategories->plug( settingsMenu ); |
2164 | mActionManageCategories->plug( settingsMenu ); | 2171 | mActionManageCategories->plug( settingsMenu ); |
2165 | 2172 | ||
2166 | 2173 | ||
2167 | mActionWN->plug( helpMenu ); | 2174 | mActionWN->plug( helpMenu ); |
2168 | mActionSyncHowto->plug( helpMenu ); | 2175 | mActionSyncHowto->plug( helpMenu ); |
2169 | mActionKdeSyncHowto->plug( helpMenu ); | 2176 | mActionKdeSyncHowto->plug( helpMenu ); |
2170 | mActionMultiSyncHowto->plug( helpMenu ); | 2177 | mActionMultiSyncHowto->plug( helpMenu ); |
2171 | mActionFaq->plug( helpMenu ); | 2178 | mActionFaq->plug( helpMenu ); |
2172 | mActionLicence->plug( helpMenu ); | 2179 | mActionLicence->plug( helpMenu ); |
2173 | mActionAboutKAddressbook->plug( helpMenu ); | 2180 | mActionAboutKAddressbook->plug( helpMenu ); |
2174 | 2181 | ||
2175 | if (KGlobal::getDesktopSize() > KGlobal::Small ) { | 2182 | if (KGlobal::getDesktopSize() > KGlobal::Small ) { |
2176 | 2183 | ||
2177 | mActionSave->plug( tb ); | 2184 | mActionSave->plug( tb ); |
2178 | mViewManager->getFilterAction()->plug ( tb); | 2185 | mViewManager->getFilterAction()->plug ( tb); |
2179 | if (KGlobal::getDesktopSize() == KGlobal::Desktop ) { | 2186 | if (KGlobal::getDesktopSize() == KGlobal::Desktop ) { |
2180 | mActionUndo->plug( tb ); | 2187 | mActionUndo->plug( tb ); |
2181 | mActionDelete->plug( tb ); | 2188 | mActionDelete->plug( tb ); |
2182 | mActionRedo->plug( tb ); | 2189 | mActionRedo->plug( tb ); |
2183 | } | 2190 | } |
2184 | } else { | 2191 | } else { |
2185 | mActionSave->plug( tb ); | 2192 | mActionSave->plug( tb ); |
2186 | tb->enableMoving(false); | 2193 | tb->enableMoving(false); |
2187 | } | 2194 | } |
2188 | //mActionQuit->plug ( tb ); | 2195 | //mActionQuit->plug ( tb ); |
2189 | // tb->insertWidget(-1, 0, mIncSearchWidget, 6); | 2196 | // tb->insertWidget(-1, 0, mIncSearchWidget, 6); |
2190 | 2197 | ||
2191 | //US link the searchwidget first to this. | 2198 | //US link the searchwidget first to this. |
2192 | // The real linkage to the toolbar happens later. | 2199 | // The real linkage to the toolbar happens later. |
2193 | //US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); | 2200 | //US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); |
2194 | //US tb->insertItem( mIncSearchWidget ); | 2201 | //US tb->insertItem( mIncSearchWidget ); |
2195 | /*US | 2202 | /*US |
2196 | mIncSearchWidget = new IncSearchWidget( tb ); | 2203 | mIncSearchWidget = new IncSearchWidget( tb ); |
2197 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), | 2204 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), |
2198 | SLOT( incrementalSearch( const QString& ) ) ); | 2205 | SLOT( incrementalSearch( const QString& ) ) ); |
2199 | 2206 | ||
2200 | mJumpButtonBar = new JumpButtonBar( this, this ); | 2207 | mJumpButtonBar = new JumpButtonBar( this, this ); |
2201 | 2208 | ||
2202 | //US topLayout->addWidget( mJumpButtonBar ); | 2209 | //US topLayout->addWidget( mJumpButtonBar ); |
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index 88e83f0..c7c12ff 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h | |||
@@ -427,89 +427,90 @@ class KABCore : public QWidget, public KSyncInterface | |||
427 | KAction *mActionMail; | 427 | KAction *mActionMail; |
428 | KAction *mActionBeam; | 428 | KAction *mActionBeam; |
429 | KToggleAction *mActionBR; | 429 | KToggleAction *mActionBR; |
430 | KAction *mActionExport2phone; | 430 | KAction *mActionExport2phone; |
431 | KAction* mActionPrint; | 431 | KAction* mActionPrint; |
432 | KAction* mActionNewContact; | 432 | KAction* mActionNewContact; |
433 | KAction *mActionSave; | 433 | KAction *mActionSave; |
434 | KAction *mActionEditAddressee; | 434 | KAction *mActionEditAddressee; |
435 | KAction *mActionMailVCard; | 435 | KAction *mActionMailVCard; |
436 | KAction *mActionBeamVCard; | 436 | KAction *mActionBeamVCard; |
437 | 437 | ||
438 | KAction *mActionQuit; | 438 | KAction *mActionQuit; |
439 | 439 | ||
440 | //US edit menu | 440 | //US edit menu |
441 | KAction *mActionCopy; | 441 | KAction *mActionCopy; |
442 | KAction *mActionCut; | 442 | KAction *mActionCut; |
443 | KAction *mActionPaste; | 443 | KAction *mActionPaste; |
444 | KAction *mActionSelectAll; | 444 | KAction *mActionSelectAll; |
445 | KAction *mActionUndo; | 445 | KAction *mActionUndo; |
446 | KAction *mActionRedo; | 446 | KAction *mActionRedo; |
447 | KAction *mActionDelete; | 447 | KAction *mActionDelete; |
448 | 448 | ||
449 | //US settings menu | 449 | //US settings menu |
450 | KAction *mActionConfigResources; | 450 | KAction *mActionConfigResources; |
451 | KAction *mActionConfigKAddressbook; | 451 | KAction *mActionConfigKAddressbook; |
452 | KAction *mActionConfigShortcuts; | 452 | KAction *mActionConfigShortcuts; |
453 | KAction *mActionConfigureToolbars; | 453 | KAction *mActionConfigureToolbars; |
454 | KAction *mActionKeyBindings; | 454 | KAction *mActionKeyBindings; |
455 | KToggleAction *mActionJumpBar; | 455 | KToggleAction *mActionJumpBar; |
456 | KToggleAction *mActionDetails; | 456 | KToggleAction *mActionDetails; |
457 | KAction *mActionWhoAmI; | 457 | KAction *mActionWhoAmI; |
458 | KAction *mActionCategories; | 458 | KAction *mActionCategories; |
459 | KAction *mActionEditCategories; | 459 | KAction *mActionEditCategories; |
460 | KAction *mActionManageCategories; | 460 | KAction *mActionManageCategories; |
461 | KAction *mActionAboutKAddressbook; | 461 | KAction *mActionAboutKAddressbook; |
462 | KAction *mActionLicence; | 462 | KAction *mActionLicence; |
463 | KAction *mActionFaq; | 463 | KAction *mActionFaq; |
464 | KAction *mActionWN; | 464 | KAction *mActionWN; |
465 | KAction *mActionSyncHowto; | 465 | KAction *mActionSyncHowto; |
466 | KAction *mActionKdeSyncHowto; | 466 | KAction *mActionKdeSyncHowto; |
467 | KAction *mActionMultiSyncHowto; | 467 | KAction *mActionMultiSyncHowto; |
468 | 468 | ||
469 | KAction *mActionDeleteView; | 469 | KAction *mActionDeleteView; |
470 | 470 | ||
471 | QPopupMenu *viewMenu; | 471 | QPopupMenu *viewMenu; |
472 | QPopupMenu *filterMenu; | 472 | QPopupMenu *filterMenu; |
473 | QPopupMenu *settingsMenu; | 473 | QPopupMenu *settingsMenu; |
474 | QPopupMenu *changeMenu; | 474 | QPopupMenu *changeMenu; |
475 | QPopupMenu *beamMenu; | ||
475 | //US QAction *mActionSave; | 476 | //US QAction *mActionSave; |
476 | QPopupMenu *ImportMenu; | 477 | QPopupMenu *ImportMenu; |
477 | QPopupMenu *ExportMenu; | 478 | QPopupMenu *ExportMenu; |
478 | //LR additional methods | 479 | //LR additional methods |
479 | KAction *mActionRemoveVoice; | 480 | KAction *mActionRemoveVoice; |
480 | KAction * mActionImportOL; | 481 | KAction * mActionImportOL; |
481 | 482 | ||
482 | #ifndef KAB_EMBEDDED | 483 | #ifndef KAB_EMBEDDED |
483 | KAddressBookService *mAddressBookService; | 484 | KAddressBookService *mAddressBookService; |
484 | #endif //KAB_EMBEDDED | 485 | #endif //KAB_EMBEDDED |
485 | 486 | ||
486 | class KABCorePrivate; | 487 | class KABCorePrivate; |
487 | KABCorePrivate *d; | 488 | KABCorePrivate *d; |
488 | //US bool mBlockSaveFlag; | 489 | //US bool mBlockSaveFlag; |
489 | 490 | ||
490 | #ifdef KAB_EMBEDDED | 491 | #ifdef KAB_EMBEDDED |
491 | KAddressBookMain *mMainWindow; // should be the same like mGUIClient | 492 | KAddressBookMain *mMainWindow; // should be the same like mGUIClient |
492 | #endif //KAB_EMBEDDED | 493 | #endif //KAB_EMBEDDED |
493 | 494 | ||
494 | //this are the overwritten callbackmethods from the syncinterface | 495 | //this are the overwritten callbackmethods from the syncinterface |
495 | virtual bool sync(KSyncManager* manager, QString filename, int mode); | 496 | virtual bool sync(KSyncManager* manager, QString filename, int mode); |
496 | virtual bool syncExternal(KSyncManager* manager, QString resource); | 497 | virtual bool syncExternal(KSyncManager* manager, QString resource); |
497 | virtual void removeSyncInfo( QString syncProfile); | 498 | virtual void removeSyncInfo( QString syncProfile); |
498 | bool syncPhone(); | 499 | bool syncPhone(); |
499 | void message( QString m ); | 500 | void message( QString m ); |
500 | 501 | ||
501 | // LR ******************************* | 502 | // LR ******************************* |
502 | // sync stuff! | 503 | // sync stuff! |
503 | QString sentSyncFile(); | 504 | QString sentSyncFile(); |
504 | QPopupMenu *syncMenu; | 505 | QPopupMenu *syncMenu; |
505 | KSyncManager* syncManager; | 506 | KSyncManager* syncManager; |
506 | int mGlobalSyncMode; | 507 | int mGlobalSyncMode; |
507 | bool synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode); | 508 | bool synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode); |
508 | KABC::Addressee getLastSyncAddressee(); | 509 | KABC::Addressee getLastSyncAddressee(); |
509 | QDateTime mLastAddressbookSync; | 510 | QDateTime mLastAddressbookSync; |
510 | int takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ); | 511 | int takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ); |
511 | // ********************* | 512 | // ********************* |
512 | 513 | ||
513 | }; | 514 | }; |
514 | 515 | ||
515 | #endif | 516 | #endif |