author | zautrix <zautrix> | 2004-10-10 23:26:49 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-10 23:26:49 (UTC) |
commit | ea40295e233db219dc2431960e18fb4398ddb75c (patch) (unidiff) | |
tree | 1d654ae51d7f65f4375787105951a8f4f9fc359e /kaddressbook/kabcore.cpp | |
parent | 640874bb21ea348edb33a54690ad225e0efdd1e4 (diff) | |
download | kdepimpi-ea40295e233db219dc2431960e18fb4398ddb75c.zip kdepimpi-ea40295e233db219dc2431960e18fb4398ddb75c.tar.gz kdepimpi-ea40295e233db219dc2431960e18fb4398ddb75c.tar.bz2 |
added better searching in kapi
-rw-r--r-- | kaddressbook/kabcore.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index cd261f6..f2d4cd6 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -1580,193 +1580,194 @@ void KABCore::initGUI() | |||
1580 | 1580 | ||
1581 | 1581 | ||
1582 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); | 1582 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); |
1583 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); | 1583 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); |
1584 | 1584 | ||
1585 | topLayout->addWidget(mMiniSplitter ); | 1585 | topLayout->addWidget(mMiniSplitter ); |
1586 | 1586 | ||
1587 | mExtensionBarSplitter = new KDGanttMinimizeSplitter( Qt::Vertical,mMiniSplitter ); | 1587 | mExtensionBarSplitter = new KDGanttMinimizeSplitter( Qt::Vertical,mMiniSplitter ); |
1588 | mExtensionBarSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); | 1588 | mExtensionBarSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); |
1589 | mViewManager = new ViewManager( this, mExtensionBarSplitter ); | 1589 | mViewManager = new ViewManager( this, mExtensionBarSplitter ); |
1590 | mDetails = new ViewContainer( mMiniSplitter ); | 1590 | mDetails = new ViewContainer( mMiniSplitter ); |
1591 | mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); | 1591 | mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); |
1592 | #else | 1592 | #else |
1593 | if ( QApplication::desktop()->width() > 480 ) { | 1593 | if ( QApplication::desktop()->width() > 480 ) { |
1594 | topLayout = new QHBoxLayout( this ); | 1594 | topLayout = new QHBoxLayout( this ); |
1595 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); | 1595 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); |
1596 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); | 1596 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); |
1597 | } else { | 1597 | } else { |
1598 | 1598 | ||
1599 | topLayout = new QHBoxLayout( this ); | 1599 | topLayout = new QHBoxLayout( this ); |
1600 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this); | 1600 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this); |
1601 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); | 1601 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); |
1602 | } | 1602 | } |
1603 | 1603 | ||
1604 | topLayout->addWidget(mMiniSplitter ); | 1604 | topLayout->addWidget(mMiniSplitter ); |
1605 | mViewManager = new ViewManager( this, mMiniSplitter ); | 1605 | mViewManager = new ViewManager( this, mMiniSplitter ); |
1606 | mDetails = new ViewContainer( mMiniSplitter ); | 1606 | mDetails = new ViewContainer( mMiniSplitter ); |
1607 | 1607 | ||
1608 | 1608 | ||
1609 | mExtensionManager = new ExtensionManager( this, mMiniSplitter ); | 1609 | mExtensionManager = new ExtensionManager( this, mMiniSplitter ); |
1610 | #endif | 1610 | #endif |
1611 | //eh->hide(); | 1611 | //eh->hide(); |
1612 | // topLayout->addWidget(mExtensionManager ); | 1612 | // topLayout->addWidget(mExtensionManager ); |
1613 | 1613 | ||
1614 | 1614 | ||
1615 | /*US | 1615 | /*US |
1616 | #ifndef KAB_NOSPLITTER | 1616 | #ifndef KAB_NOSPLITTER |
1617 | QHBoxLayout *topLayout = new QHBoxLayout( this ); | 1617 | QHBoxLayout *topLayout = new QHBoxLayout( this ); |
1618 | //US topLayout->setSpacing( KDialogBase::spacingHint() ); | 1618 | //US topLayout->setSpacing( KDialogBase::spacingHint() ); |
1619 | topLayout->setSpacing( 10 ); | 1619 | topLayout->setSpacing( 10 ); |
1620 | 1620 | ||
1621 | mDetailsSplitter = new QSplitter( this ); | 1621 | mDetailsSplitter = new QSplitter( this ); |
1622 | 1622 | ||
1623 | QVBox *viewSpace = new QVBox( mDetailsSplitter ); | 1623 | QVBox *viewSpace = new QVBox( mDetailsSplitter ); |
1624 | 1624 | ||
1625 | mViewManager = new ViewManager( this, viewSpace ); | 1625 | mViewManager = new ViewManager( this, viewSpace ); |
1626 | viewSpace->setStretchFactor( mViewManager, 1 ); | 1626 | viewSpace->setStretchFactor( mViewManager, 1 ); |
1627 | 1627 | ||
1628 | mDetails = new ViewContainer( mDetailsSplitter ); | 1628 | mDetails = new ViewContainer( mDetailsSplitter ); |
1629 | 1629 | ||
1630 | topLayout->addWidget( mDetailsSplitter ); | 1630 | topLayout->addWidget( mDetailsSplitter ); |
1631 | topLayout->setStretchFactor( mDetailsSplitter, 100 ); | 1631 | topLayout->setStretchFactor( mDetailsSplitter, 100 ); |
1632 | #else //KAB_NOSPLITTER | 1632 | #else //KAB_NOSPLITTER |
1633 | QHBoxLayout *topLayout = new QHBoxLayout( this ); | 1633 | QHBoxLayout *topLayout = new QHBoxLayout( this ); |
1634 | //US topLayout->setSpacing( KDialogBase::spacingHint() ); | 1634 | //US topLayout->setSpacing( KDialogBase::spacingHint() ); |
1635 | topLayout->setSpacing( 10 ); | 1635 | topLayout->setSpacing( 10 ); |
1636 | 1636 | ||
1637 | // mDetailsSplitter = new QSplitter( this ); | 1637 | // mDetailsSplitter = new QSplitter( this ); |
1638 | 1638 | ||
1639 | QVBox *viewSpace = new QVBox( this ); | 1639 | QVBox *viewSpace = new QVBox( this ); |
1640 | 1640 | ||
1641 | mViewManager = new ViewManager( this, viewSpace ); | 1641 | mViewManager = new ViewManager( this, viewSpace ); |
1642 | viewSpace->setStretchFactor( mViewManager, 1 ); | 1642 | viewSpace->setStretchFactor( mViewManager, 1 ); |
1643 | 1643 | ||
1644 | mDetails = new ViewContainer( this ); | 1644 | mDetails = new ViewContainer( this ); |
1645 | 1645 | ||
1646 | topLayout->addWidget( viewSpace ); | 1646 | topLayout->addWidget( viewSpace ); |
1647 | // topLayout->setStretchFactor( mDetailsSplitter, 100 ); | 1647 | // topLayout->setStretchFactor( mDetailsSplitter, 100 ); |
1648 | topLayout->addWidget( mDetails ); | 1648 | topLayout->addWidget( mDetails ); |
1649 | #endif //KAB_NOSPLITTER | 1649 | #endif //KAB_NOSPLITTER |
1650 | */ | 1650 | */ |
1651 | 1651 | ||
1652 | syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); | 1652 | syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); |
1653 | syncManager->setBlockSave(false); | 1653 | syncManager->setBlockSave(false); |
1654 | 1654 | ||
1655 | connect(syncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); | 1655 | connect(syncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); |
1656 | connect(syncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); | 1656 | connect(syncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); |
1657 | syncManager->setDefaultFileName( sentSyncFile()); | 1657 | syncManager->setDefaultFileName( sentSyncFile()); |
1658 | //connect(syncManager , SIGNAL( ), this, SLOT( ) ); | 1658 | //connect(syncManager , SIGNAL( ), this, SLOT( ) ); |
1659 | 1659 | ||
1660 | #endif //KAB_EMBEDDED | 1660 | #endif //KAB_EMBEDDED |
1661 | initActions(); | 1661 | initActions(); |
1662 | 1662 | ||
1663 | #ifdef KAB_EMBEDDED | 1663 | #ifdef KAB_EMBEDDED |
1664 | addActionsManually(); | 1664 | addActionsManually(); |
1665 | //US make sure the export and import menues are initialized before creating the xxPortManager. | 1665 | //US make sure the export and import menues are initialized before creating the xxPortManager. |
1666 | mXXPortManager = new XXPortManager( this, this ); | 1666 | mXXPortManager = new XXPortManager( this, this ); |
1667 | 1667 | ||
1668 | // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() ); | 1668 | // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() ); |
1669 | //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget); | 1669 | //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget); |
1670 | // mActionQuit->plug ( mMainWindow->toolBar()); | 1670 | // mActionQuit->plug ( mMainWindow->toolBar()); |
1671 | //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() ); | 1671 | //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() ); |
1672 | //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget); | 1672 | //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget); |
1673 | // mIncSearchWidget->hide(); | 1673 | // mIncSearchWidget->hide(); |
1674 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), | 1674 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), |
1675 | SLOT( incrementalSearch( const QString& ) ) ); | 1675 | SLOT( incrementalSearch( const QString& ) ) ); |
1676 | 1676 | connect( mIncSearchWidget, SIGNAL( scrollUP() ),mViewManager, SLOT( scrollUP() ) ); | |
1677 | connect( mIncSearchWidget, SIGNAL( scrollDOWN() ),mViewManager, SLOT( scrollDOWN() ) ); | ||
1677 | 1678 | ||
1678 | mJumpButtonBar = new JumpButtonBar( this, this ); | 1679 | mJumpButtonBar = new JumpButtonBar( this, this ); |
1679 | 1680 | ||
1680 | topLayout->addWidget( mJumpButtonBar ); | 1681 | topLayout->addWidget( mJumpButtonBar ); |
1681 | //US topLayout->setStretchFactor( mJumpButtonBar, 10 ); | 1682 | //US topLayout->setStretchFactor( mJumpButtonBar, 10 ); |
1682 | 1683 | ||
1683 | // mMainWindow->getIconToolBar()->raise(); | 1684 | // mMainWindow->getIconToolBar()->raise(); |
1684 | 1685 | ||
1685 | #endif //KAB_EMBEDDED | 1686 | #endif //KAB_EMBEDDED |
1686 | 1687 | ||
1687 | } | 1688 | } |
1688 | void KABCore::initActions() | 1689 | void KABCore::initActions() |
1689 | { | 1690 | { |
1690 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); | 1691 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); |
1691 | 1692 | ||
1692 | #ifndef KAB_EMBEDDED | 1693 | #ifndef KAB_EMBEDDED |
1693 | connect( QApplication::clipboard(), SIGNAL( dataChanged() ), | 1694 | connect( QApplication::clipboard(), SIGNAL( dataChanged() ), |
1694 | SLOT( clipboardDataChanged() ) ); | 1695 | SLOT( clipboardDataChanged() ) ); |
1695 | #endif //KAB_EMBEDDED | 1696 | #endif //KAB_EMBEDDED |
1696 | 1697 | ||
1697 | // file menu | 1698 | // file menu |
1698 | if ( mIsPart ) { | 1699 | if ( mIsPart ) { |
1699 | mActionMail = new KAction( i18n( "&Mail" ), "mail_generic", 0, this, | 1700 | mActionMail = new KAction( i18n( "&Mail" ), "mail_generic", 0, this, |
1700 | SLOT( sendMail() ), actionCollection(), | 1701 | SLOT( sendMail() ), actionCollection(), |
1701 | "kaddressbook_mail" ); | 1702 | "kaddressbook_mail" ); |
1702 | mActionPrint = new KAction( i18n( "&Print" ), "fileprint", CTRL + Key_P, this, | 1703 | mActionPrint = new KAction( i18n( "&Print" ), "fileprint", CTRL + Key_P, this, |
1703 | SLOT( print() ), actionCollection(), "kaddressbook_print" ); | 1704 | SLOT( print() ), actionCollection(), "kaddressbook_print" ); |
1704 | 1705 | ||
1705 | } else { | 1706 | } else { |
1706 | mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() ); | 1707 | mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() ); |
1707 | mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() ); | 1708 | mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() ); |
1708 | } | 1709 | } |
1709 | 1710 | ||
1710 | 1711 | ||
1711 | mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this, | 1712 | mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this, |
1712 | SLOT( save() ), actionCollection(), "file_sync" ); | 1713 | SLOT( save() ), actionCollection(), "file_sync" ); |
1713 | 1714 | ||
1714 | mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this, | 1715 | mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this, |
1715 | SLOT( newContact() ), actionCollection(), "file_new_contact" ); | 1716 | SLOT( newContact() ), actionCollection(), "file_new_contact" ); |
1716 | 1717 | ||
1717 | mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0, | 1718 | mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0, |
1718 | this, SLOT( mailVCard() ), | 1719 | this, SLOT( mailVCard() ), |
1719 | actionCollection(), "file_mail_vcard"); | 1720 | actionCollection(), "file_mail_vcard"); |
1720 | 1721 | ||
1721 | mActionExport2phone = new KAction( i18n( "Selected to phone" ), "ex2phone", 0, this, | 1722 | mActionExport2phone = new KAction( i18n( "Selected to phone" ), "ex2phone", 0, this, |
1722 | SLOT( export2phone() ), actionCollection(), | 1723 | SLOT( export2phone() ), actionCollection(), |
1723 | "kaddressbook_ex2phone" ); | 1724 | "kaddressbook_ex2phone" ); |
1724 | 1725 | ||
1725 | mActionBeamVCard = 0; | 1726 | mActionBeamVCard = 0; |
1726 | mActionBeam = 0; | 1727 | mActionBeam = 0; |
1727 | 1728 | ||
1728 | #ifndef DESKTOP_VERSION | 1729 | #ifndef DESKTOP_VERSION |
1729 | if ( Ir::supported() ) { | 1730 | if ( Ir::supported() ) { |
1730 | mActionBeamVCard = new KAction( i18n( "Beam selected v&Card(s)" ), "beam", 0, this, | 1731 | mActionBeamVCard = new KAction( i18n( "Beam selected v&Card(s)" ), "beam", 0, this, |
1731 | SLOT( beamVCard() ), actionCollection(), | 1732 | SLOT( beamVCard() ), actionCollection(), |
1732 | "kaddressbook_beam_vcard" ); | 1733 | "kaddressbook_beam_vcard" ); |
1733 | 1734 | ||
1734 | mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this, | 1735 | mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this, |
1735 | SLOT( beamMySelf() ), actionCollection(), | 1736 | SLOT( beamMySelf() ), actionCollection(), |
1736 | "kaddressbook_beam_myself" ); | 1737 | "kaddressbook_beam_myself" ); |
1737 | } | 1738 | } |
1738 | #endif | 1739 | #endif |
1739 | 1740 | ||
1740 | mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0, | 1741 | mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0, |
1741 | this, SLOT( editContact2() ), | 1742 | this, SLOT( editContact2() ), |
1742 | actionCollection(), "file_properties" ); | 1743 | actionCollection(), "file_properties" ); |
1743 | 1744 | ||
1744 | #ifdef KAB_EMBEDDED | 1745 | #ifdef KAB_EMBEDDED |
1745 | // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() ); | 1746 | // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() ); |
1746 | mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0, | 1747 | mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0, |
1747 | mMainWindow, SLOT( exit() ), | 1748 | mMainWindow, SLOT( exit() ), |
1748 | actionCollection(), "quit" ); | 1749 | actionCollection(), "quit" ); |
1749 | #endif //KAB_EMBEDDED | 1750 | #endif //KAB_EMBEDDED |
1750 | 1751 | ||
1751 | // edit menu | 1752 | // edit menu |
1752 | if ( mIsPart ) { | 1753 | if ( mIsPart ) { |
1753 | mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this, | 1754 | mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this, |
1754 | SLOT( copyContacts() ), actionCollection(), | 1755 | SLOT( copyContacts() ), actionCollection(), |
1755 | "kaddressbook_copy" ); | 1756 | "kaddressbook_copy" ); |
1756 | mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this, | 1757 | mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this, |
1757 | SLOT( cutContacts() ), actionCollection(), | 1758 | SLOT( cutContacts() ), actionCollection(), |
1758 | "kaddressbook_cut" ); | 1759 | "kaddressbook_cut" ); |
1759 | mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this, | 1760 | mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this, |
1760 | SLOT( pasteContacts() ), actionCollection(), | 1761 | SLOT( pasteContacts() ), actionCollection(), |
1761 | "kaddressbook_paste" ); | 1762 | "kaddressbook_paste" ); |
1762 | mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this, | 1763 | mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this, |
1763 | SLOT( selectAllContacts() ), actionCollection(), | 1764 | SLOT( selectAllContacts() ), actionCollection(), |
1764 | "kaddressbook_select_all" ); | 1765 | "kaddressbook_select_all" ); |
1765 | mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this, | 1766 | mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this, |
1766 | SLOT( undo() ), actionCollection(), | 1767 | SLOT( undo() ), actionCollection(), |
1767 | "kaddressbook_undo" ); | 1768 | "kaddressbook_undo" ); |
1768 | mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z, | 1769 | mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z, |
1769 | this, SLOT( redo() ), actionCollection(), | 1770 | this, SLOT( redo() ), actionCollection(), |
1770 | "kaddressbook_redo" ); | 1771 | "kaddressbook_redo" ); |
1771 | } else { | 1772 | } else { |
1772 | mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() ); | 1773 | mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() ); |