summaryrefslogtreecommitdiffabout
path: root/kaddressbook/incsearchwidget.cpp
authorzautrix <zautrix>2004-09-11 22:40:15 (UTC)
committer zautrix <zautrix>2004-09-11 22:40:15 (UTC)
commita040c9d56282dae396b02627fafb602e44323837 (patch) (side-by-side diff)
tree9ee997f51e46a1ae6ab5aeaab709f1b8e138f3df /kaddressbook/incsearchwidget.cpp
parent53dda80aaab72d7efdbed8a206dc1fa64fed10ee (diff)
downloadkdepimpi-a040c9d56282dae396b02627fafb602e44323837.zip
kdepimpi-a040c9d56282dae396b02627fafb602e44323837.tar.gz
kdepimpi-a040c9d56282dae396b02627fafb602e44323837.tar.bz2
Added configure for search
Diffstat (limited to 'kaddressbook/incsearchwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/incsearchwidget.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/kaddressbook/incsearchwidget.cpp b/kaddressbook/incsearchwidget.cpp
index 2ffa357..3533427 100644
--- a/kaddressbook/incsearchwidget.cpp
+++ b/kaddressbook/incsearchwidget.cpp
@@ -30,6 +30,8 @@
#include <klineedit.h>
#include <klocale.h>
#include <kglobal.h>
+#include <kglobal.h>
+#include "kabprefs.h"
#include "incsearchwidget.h"
@@ -67,13 +69,13 @@ IncSearchWidget::IncSearchWidget( QWidget *parent, const char *name )
// resize( QSize(30, 10).expandedTo( sizeHint() ) );
// #endif //KAB_EMBEDDED
-#ifdef DESKTOP_VERSION
+
// for performance reasons, we do a search on the pda only after return is pressed
connect( mSearchText, SIGNAL( textChanged( const QString& ) ),
- SLOT( announceDoSearch() ) );
+ SLOT( announceDoSearch2() ) );
connect( mFieldCombo, SIGNAL( activated( const QString& ) ),
- SLOT( announceDoSearch() ) );
-#endif
+ SLOT( announceDoSearch2() ) );
+
connect( mSearchText, SIGNAL( returnPressed() ),
SLOT( announceDoSearch() ) );
connect( mFieldCombo, SIGNAL( activated( const QString& ) ),
@@ -86,10 +88,19 @@ 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()