author | tille <tille> | 2003-05-15 13:55:07 (UTC) |
---|---|---|
committer | tille <tille> | 2003-05-15 13:55:07 (UTC) |
commit | 80e9fd1b08a3a7173ecf443b2830df4ca6e83ce6 (patch) (unidiff) | |
tree | 4245ef4caf67784b452b908a9528ae03f988bf4c /core/pim/osearch/searchgroup.cpp | |
parent | ded2a7a5715af1d1f6aab0b79ba90d8a815a9adc (diff) | |
download | opie-80e9fd1b08a3a7173ecf443b2830df4ca6e83ce6.zip opie-80e9fd1b08a3a7173ecf443b2830df4ca6e83ce6.tar.gz opie-80e9fd1b08a3a7173ecf443b2830df4ca6e83ce6.tar.bz2 |
owait and settings for search group:
- hide completed todos
- show only later events
- do not display hits in datebook dated
Diffstat (limited to 'core/pim/osearch/searchgroup.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/osearch/searchgroup.cpp | 50 |
1 files changed, 28 insertions, 22 deletions
diff --git a/core/pim/osearch/searchgroup.cpp b/core/pim/osearch/searchgroup.cpp index 490deea..e307696 100644 --- a/core/pim/osearch/searchgroup.cpp +++ b/core/pim/osearch/searchgroup.cpp | |||
@@ -15,4 +15,4 @@ | |||
15 | #include <qregexp.h> | 15 | #include <qregexp.h> |
16 | // #include <qapplication.h> | 16 | #include <qapplication.h> |
17 | // #include <opie/owait.h> | 17 | #include <opie/owait.h> |
18 | 18 | ||
@@ -20,2 +20,7 @@ | |||
20 | 20 | ||
21 | //#define NEW_OWAIT | ||
22 | #ifndef NEW_OWAIT | ||
23 | static OWait *wait = 0; | ||
24 | #endif | ||
25 | |||
21 | SearchGroup::SearchGroup(QListView* parent, QString name) | 26 | SearchGroup::SearchGroup(QListView* parent, QString name) |
@@ -51,4 +56,3 @@ void SearchGroup::doSearch() | |||
51 | if (_search.isEmpty()) return; | 56 | if (_search.isEmpty()) return; |
52 | int res_count = realSearch(); | 57 | _resultCount = realSearch(); |
53 | setText(0, _name + " - " + _search.pattern() + " (" + QString::number( res_count ) + ")"); | ||
54 | //repaint(); | 58 | //repaint(); |
@@ -56,15 +60,5 @@ void SearchGroup::doSearch() | |||
56 | 60 | ||
57 | void SearchGroup::clearList() | ||
58 | { | ||
59 | QListViewItem *item = firstChild(); | ||
60 | QListViewItem *toDel; | ||
61 | while ( item != 0 ) { | ||
62 | toDel = item; | ||
63 | item = item->nextSibling(); | ||
64 | delete toDel; | ||
65 | } | ||
66 | } | ||
67 | |||
68 | void SearchGroup::setSearch(QRegExp re) | 61 | void SearchGroup::setSearch(QRegExp re) |
69 | { | 62 | { |
63 | if (re == _search) return; | ||
70 | setText(0, _name+" - "+re.pattern() ); | 64 | setText(0, _name+" - "+re.pattern() ); |
@@ -77,10 +71,22 @@ int SearchGroup::realSearch() | |||
77 | { | 71 | { |
78 | //emit isSearching( tr(" Searching for %s in %s" ).arg( _search.pattern().latin1()).arg( _name ) ); | 72 | #ifndef NEW_OWAIT |
79 | /*OWait *wait = new OWait( qApp->mainWidget(), "test" ); | 73 | qDebug("NOT using NEW_OWAIT"); |
80 | wait->show();*/ | 74 | if (!wait) wait = new OWait( qApp->mainWidget(), "osearch" ); |
75 | wait->show(); | ||
76 | qApp->processEvents(); | ||
77 | #else | ||
78 | qDebug("using NEW_OWAIT"); | ||
79 | OWait::start( "osearch" ); | ||
80 | #endif | ||
81 | if (!loaded) load(); | 81 | if (!loaded) load(); |
82 | int count = search(); | 82 | _resultCount = 0; |
83 | /*wait->hide(); | 83 | _resultCount = search(); |
84 | delete wait;*/ | 84 | setText(0, _name + " - " + _search.pattern() + " (" + QString::number( _resultCount ) + ")"); |
85 | return count; | 85 | |
86 | #ifndef NEW_OWAIT | ||
87 | wait->hide(); | ||
88 | #else | ||
89 | OWait::stop(); | ||
90 | #endif | ||
91 | return _resultCount; | ||
86 | } | 92 | } |