summaryrefslogtreecommitdiff
path: root/core/pim/osearch/mainwindow.cpp
authortille <tille>2003-05-13 13:46:19 (UTC)
committer tille <tille>2003-05-13 13:46:19 (UTC)
commitba4bb8e673fba43ae7a232942dea14d166991530 (patch) (side-by-side diff)
treee775ad637d5256eb1412e576c1bd5e77ed50406d /core/pim/osearch/mainwindow.cpp
parent1461a41433a732e3a615508e5de23f8acd91de6a (diff)
downloadopie-ba4bb8e673fba43ae7a232942dea14d166991530.zip
opie-ba4bb8e673fba43ae7a232942dea14d166991530.tar.gz
opie-ba4bb8e673fba43ae7a232942dea14d166991530.tar.bz2
icons ;)
Diffstat (limited to 'core/pim/osearch/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/osearch/mainwindow.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/core/pim/osearch/mainwindow.cpp b/core/pim/osearch/mainwindow.cpp
index e15cc7e..33a24bc 100644
--- a/core/pim/osearch/mainwindow.cpp
+++ b/core/pim/osearch/mainwindow.cpp
@@ -89,4 +89,6 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) :
popupTimer = new QTimer();
+ searchTimer = new QTimer();
connect(popupTimer, SIGNAL(timeout()), SLOT(showPopup()));
+ connect(searchTimer, SIGNAL(timeout()), SLOT(searchStringChanged()));
connect(resultsList, SIGNAL(pressed(QListViewItem*)), SLOT(setCurrent(QListViewItem*)));
@@ -113,5 +115,6 @@ void MainWindow::makeMenu()
//SEARCH
- QAction *action = new QAction( tr("Search all"),QString::null, 0, this, 0 );
- connect( action, SIGNAL(activated()), this, SLOT(searchAll()) );
- action->addTo( searchMenu );
+ SearchAllAction = new QAction( tr("Search all"),QString::null, 0, this, 0 );
+ SearchAllAction->setIconSet( Resource::loadIconSet( "find" ) );
+ connect( SearchAllAction, SIGNAL(activated()), this, SLOT(searchAll()) );
+ SearchAllAction->addTo( searchMenu );
actionCaseSensitiv = new QAction( tr("Case sensitiv"),QString::null, 0, this, 0, true );
@@ -125,2 +128,3 @@ void MainWindow::makeMenu()
searchBar->setStretchableWidget( searchEdit );
+ SearchAllAction->addTo( searchBar );
connect( searchEdit, SIGNAL( textChanged( const QString & ) ),
@@ -186,3 +190,11 @@ void MainWindow::setSearch( const QString &key )
{
- QRegExp re( key, actionCaseSensitiv->isOn(), actionWildcards->isOn() );
+ searchTimer->stop();
+ _searchString = key;
+ searchTimer->start( 300 );
+}
+
+void MainWindow::searchStringChanged()
+{
+ searchTimer->stop();
+ QRegExp re( _searchString, actionCaseSensitiv->isOn(), actionWildcards->isOn() );
for (SearchGroup *s = searches.first(); s != 0; s = searches.next() )
@@ -193,5 +205,5 @@ void MainWindow::searchAll()
{
- bool openState;
for (SearchGroup *s = searches.first(); s != 0; s = searches.next() ){
s->doSearch();
+ //resultsList->repaint();
}