author | zautrix <zautrix> | 2004-10-10 23:26:49 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-10 23:26:49 (UTC) |
commit | ea40295e233db219dc2431960e18fb4398ddb75c (patch) (side-by-side diff) | |
tree | 1d654ae51d7f65f4375787105951a8f4f9fc359e /kaddressbook/incsearchwidget.cpp | |
parent | 640874bb21ea348edb33a54690ad225e0efdd1e4 (diff) | |
download | kdepimpi-ea40295e233db219dc2431960e18fb4398ddb75c.zip kdepimpi-ea40295e233db219dc2431960e18fb4398ddb75c.tar.gz kdepimpi-ea40295e233db219dc2431960e18fb4398ddb75c.tar.bz2 |
added better searching in kapi
Diffstat (limited to 'kaddressbook/incsearchwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | kaddressbook/incsearchwidget.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kaddressbook/incsearchwidget.cpp b/kaddressbook/incsearchwidget.cpp index 3533427..78eaf65 100644 --- a/kaddressbook/incsearchwidget.cpp +++ b/kaddressbook/incsearchwidget.cpp @@ -52,64 +52,70 @@ IncSearchWidget::IncSearchWidget( QWidget *parent, const char *name ) mSearchText = new KLineEdit( this ); layout->addWidget( mSearchText ); // #ifdef KAB_EMBEDDED // if (KGlobal::getOrientation() == KGlobal::Portrait) // mSearchText->setMaximumWidth(30); // #endif //KAB_EMBEDDED mFieldCombo = new QComboBox( false, this ); layout->addWidget( mFieldCombo ); mFieldCombo->setMaximumHeight( 34 ); QToolTip::add( mFieldCombo, i18n( "Select Incremental Search Field" ) ); // #ifndef KAB_EMBEDDED // resize( QSize(420, 50).expandedTo( sizeHint() ) ); // #else //KAB_EMBEDDED // resize( QSize(30, 10).expandedTo( sizeHint() ) ); // #endif //KAB_EMBEDDED // for performance reasons, we do a search on the pda only after return is pressed connect( mSearchText, SIGNAL( textChanged( const QString& ) ), SLOT( announceDoSearch2() ) ); connect( mFieldCombo, SIGNAL( activated( const QString& ) ), SLOT( announceDoSearch2() ) ); connect( mSearchText, SIGNAL( returnPressed() ), SLOT( announceDoSearch() ) ); connect( mFieldCombo, SIGNAL( activated( const QString& ) ), SLOT( announceFieldChanged() ) ); + + + connect( mSearchText, SIGNAL( scrollUP() ), this, SIGNAL( scrollUP() )); + connect( mSearchText, SIGNAL( scrollDOWN() ), this, SIGNAL( scrollDOWN() )); + + setFocusProxy( mSearchText ); } IncSearchWidget::~IncSearchWidget() { } void IncSearchWidget::announceDoSearch2() { if ( KABPrefs::instance()->mSearchWithReturn ) return; emit doSearch( mSearchText->text() ); //qDebug("emit dosreach "); } void IncSearchWidget::announceDoSearch() { emit doSearch( mSearchText->text() ); // qDebug("emit dosreach "); } void IncSearchWidget::announceFieldChanged() { emit fieldChanged(); } void IncSearchWidget::setFields( const KABC::Field::List &list ) { mFieldCombo->clear(); mFieldCombo->insertItem( i18n( "All Fields" ) ); |