summaryrefslogtreecommitdiff
authorzecke <zecke>2004-03-14 19:06:30 (UTC)
committer zecke <zecke>2004-03-14 19:06:30 (UTC)
commit601330a1173afbc7736d103a584b8bde20646dee (patch) (unidiff)
treeed095c532224e721df2b9caa828926bf0617abd8
parentd91c046d1faaf9fb039bda5cc186c96d4ff2c227 (diff)
downloadopie-601330a1173afbc7736d103a584b8bde20646dee.zip
opie-601330a1173afbc7736d103a584b8bde20646dee.tar.gz
opie-601330a1173afbc7736d103a584b8bde20646dee.tar.bz2
Convert to ODP
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/osearch/config.in2
-rw-r--r--core/pim/osearch/main.cpp3
-rw-r--r--core/pim/osearch/searchgroup.cpp4
3 files changed, 5 insertions, 4 deletions
diff --git a/core/pim/osearch/config.in b/core/pim/osearch/config.in
index 8d51307..8a162d4 100644
--- a/core/pim/osearch/config.in
+++ b/core/pim/osearch/config.in
@@ -1,4 +1,4 @@
1 config OSEARCH 1 config OSEARCH
2 boolean "opie-osearch (searches throught your PDA)" 2 boolean "opie-osearch (searches throught your PDA)"
3 default "y" 3 default "y"
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE 4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIEUI2 && LIBOPIEPIM2
diff --git a/core/pim/osearch/main.cpp b/core/pim/osearch/main.cpp
index e0a2de3..c440c6a 100644
--- a/core/pim/osearch/main.cpp
+++ b/core/pim/osearch/main.cpp
@@ -1,6 +1,7 @@
1 1
2#include "mainwindow.h" 2#include "mainwindow.h"
3 3
4#include <opie/oapplicationfactory.h> 4#include <opie2/oapplicationfactory.h>
5 5
6using namespace Opie::Core;
6OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) 7OPIE_EXPORT_APP( OApplicationFactory<MainWindow> )
diff --git a/core/pim/osearch/searchgroup.cpp b/core/pim/osearch/searchgroup.cpp
index 7a0b5a7..9166f72 100644
--- a/core/pim/osearch/searchgroup.cpp
+++ b/core/pim/osearch/searchgroup.cpp
@@ -4,33 +4,33 @@
4// 4//
5// Description: 5// Description:
6// 6//
7// 7//
8// Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 8// Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003
9// 9//
10// Copyright: See COPYING file that comes with this distribution 10// Copyright: See COPYING file that comes with this distribution
11// 11//
12// 12//
13#include "searchgroup.h" 13#include "searchgroup.h"
14 14
15#include <opie2/owait.h> 15#include <opie2/owait.h>
16 16
17#include <qapplication.h> 17#include <qapplication.h>
18 18
19#ifndef NEW_OWAIT 19#ifndef NEW_OWAIT
20static OWait *wait = 0; 20static Opie::Ui::OWait *wait = 0;
21#endif 21#endif
22 22
23SearchGroup::SearchGroup(QListView* parent, QString name) 23SearchGroup::SearchGroup(QListView* parent, QString name)
24: OListViewItem(parent, name) 24: OListViewItem(parent, name)
25{ 25{
26 _name = name; 26 _name = name;
27 loaded = false; 27 loaded = false;
28} 28}
29 29
30 30
31SearchGroup::~SearchGroup() 31SearchGroup::~SearchGroup()
32{ 32{
33} 33}
34 34
35 35
36void SearchGroup::expand() 36void SearchGroup::expand()
@@ -55,33 +55,33 @@ void SearchGroup::doSearch()
55 //repaint(); 55 //repaint();
56} 56}
57 57
58void SearchGroup::setSearch(QRegExp re) 58void SearchGroup::setSearch(QRegExp re)
59{ 59{
60 if (re == _search) return; 60 if (re == _search) return;
61 setText(0, _name+" - "+re.pattern() ); 61 setText(0, _name+" - "+re.pattern() );
62 _search = re; 62 _search = re;
63 if (isOpen()) expand(); 63 if (isOpen()) expand();
64 else new OListViewItem( this, "searching..."); 64 else new OListViewItem( this, "searching...");
65} 65}
66 66
67int SearchGroup::realSearch() 67int SearchGroup::realSearch()
68{ 68{
69 if (_lastSearch == _search) return _resultCount; 69 if (_lastSearch == _search) return _resultCount;
70#ifndef NEW_OWAIT 70#ifndef NEW_OWAIT
71 if (!wait) wait = new OWait( qApp->mainWidget(), "osearch" ); 71 if (!wait) wait = new Opie::Ui::OWait( qApp->mainWidget(), "osearch" );
72 wait->show(); 72 wait->show();
73 qApp->processEvents(); 73 qApp->processEvents();
74#else 74#else
75 qDebug("********** NEW_OWAIT *************"); 75 qDebug("********** NEW_OWAIT *************");
76 OWait( "searching" ); 76 OWait( "searching" );
77#endif 77#endif
78 if (!loaded) load(); 78 if (!loaded) load();
79 _resultCount = 0; 79 _resultCount = 0;
80 _resultCount = search(); 80 _resultCount = search();
81 _lastSearch = _search; 81 _lastSearch = _search;
82 setText(0, _name + " - " + _search.pattern() + " (" + QString::number( _resultCount ) + ")"); 82 setText(0, _name + " - " + _search.pattern() + " (" + QString::number( _resultCount ) + ")");
83 83
84#ifndef NEW_OWAIT 84#ifndef NEW_OWAIT
85 wait->hide(); 85 wait->hide();
86#endif 86#endif
87 return _resultCount; 87 return _resultCount;