author | tille <tille> | 2003-05-12 11:26:06 (UTC) |
---|---|---|
committer | tille <tille> | 2003-05-12 11:26:06 (UTC) |
commit | 47a67025a4d34635877ece741def266e28e46db8 (patch) (side-by-side diff) | |
tree | 4f7e3e9bf4bfe82a217958959d4ab89eb1ae79bd /core/pim/osearch/searchgroup.cpp | |
parent | bc87629a1a871888e010f885ee40b2c3d6283ab4 (diff) | |
download | opie-47a67025a4d34635877ece741def266e28e46db8.zip opie-47a67025a4d34635877ece741def266e28e46db8.tar.gz opie-47a67025a4d34635877ece741def266e28e46db8.tar.bz2 |
added menus
Diffstat (limited to 'core/pim/osearch/searchgroup.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/osearch/searchgroup.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/core/pim/osearch/searchgroup.cpp b/core/pim/osearch/searchgroup.cpp index d062207..3159984 100644 --- a/core/pim/osearch/searchgroup.cpp +++ b/core/pim/osearch/searchgroup.cpp @@ -39,12 +39,20 @@ void SearchGroup::expand() if (!loaded) load(); int res_count = search(); setText(0, _name + " - " + _search.pattern() + " (" + QString::number( res_count ) + ")"); delete dummy; } +void SearchGroup::doSearch() +{ + clearList(); + if (_search.isEmpty()) return; + if (!loaded) load(); + int res_count = search(); + setText(0, _name + " - " + _search.pattern() + " (" + QString::number( res_count ) + ")"); +} void SearchGroup::clearList() { QListViewItem *item = firstChild(); QListViewItem *toDel; @@ -53,19 +61,12 @@ void SearchGroup::clearList() item = item->nextSibling(); delete toDel; } expanded = true; } -void SearchGroup::setSearch(QString s) -{ - setSearch( QRegExp( s ) ); - _search.setCaseSensitive(false); -} - - void SearchGroup::setSearch(QRegExp re) { setText(0, _name+" - "+re.pattern() ); _search = re; if (expanded) expand(); else new OListViewItem( this, "searching..."); |