summaryrefslogtreecommitdiff
path: root/core/pim/osearch/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/osearch/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/osearch/mainwindow.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/pim/osearch/mainwindow.cpp b/core/pim/osearch/mainwindow.cpp
index 89ab690..6070fdf 100644
--- a/core/pim/osearch/mainwindow.cpp
+++ b/core/pim/osearch/mainwindow.cpp
@@ -1,46 +1,47 @@
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
// (c) 2002 Patrick S. Vogt <tille@handhelds.org>
#include "mainwindow.h"
#include <qpe/qpemenubar.h>
#include <qpe/qpemessagebox.h>
#include <qpe/resource.h>
#include <qpe/config.h>
#include <qpe/qpetoolbar.h>
#include <qpe/qpeapplication.h>
#include <qpe/config.h>
#include <qpe/global.h>
+#include <opie/owait.h>
#include <qaction.h>
#include <qmessagebox.h>
#include <qpopupmenu.h>
#include <qtoolbutton.h>
#include <qstring.h>
#include <qlabel.h>
#include <qfile.h>
#include <qhbuttongroup.h>
#include <qpushbutton.h>
#include <qintdict.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <qtextbrowser.h>
#include <qregexp.h>
#include "olistview.h"
#include "olistviewitem.h"
#include "resultitem.h"
#include "adresssearch.h"
#include "todosearch.h"
#include "datebooksearch.h"
#include "applnksearch.h"
#include "doclnksearch.h"
@@ -190,75 +191,80 @@ void MainWindow::setCurrent(QListViewItem *item)
buttonLayout->addWidget( button, 0 );
buttonGroupActions->insert( button, i);
}
button->setText( *acts[i] );
button->show();
}
for (uint i = acts.count(); i < _buttonCount; i++){
qDebug("remove button %i of %i",i, _buttonCount);
button = buttonGroupActions->find( i );
if (button) button->hide();
}
_buttonCount = acts.count();
detailsFrame->show();
}else detailsFrame->hide();
popupTimer->start( 300, true );
}
void MainWindow::stopTimer(QListViewItem*)
{
popupTimer->stop();
}
void MainWindow::showPopup()
{
- qDebug("showPopup");
popupTimer->stop();
if (!_currentItem) return;
QPopupMenu *pop = _currentItem->popupMenu();
if (pop) pop->popup( QCursor::pos() );
}
void MainWindow::setSearch( const QString &key )
{
searchTimer->stop();
_searchString = key;
searchTimer->start( 300 );
}
void MainWindow::searchStringChanged()
{
+#ifdef NEW_OWAIT
+ OWait("setting search string");
+#endif
searchTimer->stop();
QString ss = _searchString;
//ss = Global::stringQuote( _searchString );
// if (actionWholeWordsOnly->isOn())
// ss = "\\s"+_searchString+"\\s";
- qDebug(" set searchString >%s<",ss.latin1());
+// qDebug(" set searchString >%s<",ss.latin1());
QRegExp re( ss );
re.setCaseSensitive( actionCaseSensitiv->isOn() );
re.setWildcard( actionWildcards->isOn() );
for (SearchGroup *s = searches.first(); s != 0; s = searches.next() )
s->setSearch( re );
}
void MainWindow::searchAll()
{
+#ifdef NEW_OWAIT
+ OWait("searching...");
+#endif
for (SearchGroup *s = searches.first(); s != 0; s = searches.next() ){
s->doSearch();
//resultsList->repaint();
}
}
void MainWindow::slotAction( int act )
{
if (_currentItem->rtti() == OListViewItem::Result){
ResultItem *res = (ResultItem*)_currentItem;
// ResultItem *res = dynamic_cast<ResultItem*>(item);
res->action(act);
}
}
void MainWindow::optionChanged(int i)
{
qDebug("optionChanged(%i)",i);
searchStringChanged();
}