summaryrefslogtreecommitdiff
path: root/core/pim/osearch/applnksearch.cpp
Unidiff
Diffstat (limited to 'core/pim/osearch/applnksearch.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/osearch/applnksearch.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/pim/osearch/applnksearch.cpp b/core/pim/osearch/applnksearch.cpp
index acf650a..d5b181b 100644
--- a/core/pim/osearch/applnksearch.cpp
+++ b/core/pim/osearch/applnksearch.cpp
@@ -5,30 +5,35 @@
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 "applnksearch.h" 13#include "applnksearch.h"
14 14
15#include <qpe/applnk.h> 15#include <qpe/applnk.h>
16#include <qpe/qpeapplication.h> 16#include <qpe/qpeapplication.h>
17#include <qiconset.h>
18#include <qpe/resource.h>
17 19
18#include "applnkitem.h" 20#include "applnkitem.h"
19 21
20AppLnkSearch::AppLnkSearch(QListView* parent, QString name): SearchGroup(parent, name) 22AppLnkSearch::AppLnkSearch(QListView* parent, QString name): SearchGroup(parent, name)
21{ 23{
22 _apps = 0; 24 _apps = 0;
25 QIconSet is = Resource::loadIconSet( "osearch/applications" );
26 //QIconSet is = Resource::loadIconSet( "AppsIcon" );
27 setPixmap( 0, is.pixmap( QIconSet::Small, true ) );
23} 28}
24 29
25 30
26AppLnkSearch::~AppLnkSearch() 31AppLnkSearch::~AppLnkSearch()
27{ 32{
28 delete _apps; 33 delete _apps;
29} 34}
30 35
31 36
32void AppLnkSearch::load() 37void AppLnkSearch::load()
33{ 38{
34 _apps = new AppLnkSet(QPEApplication::qpeDir()); 39 _apps = new AppLnkSet(QPEApplication::qpeDir());
@@ -36,28 +41,28 @@ void AppLnkSearch::load()
36 41
37int AppLnkSearch::search() 42int AppLnkSearch::search()
38{ 43{
39 int count = 0; 44 int count = 0;
40 QList<AppLnk> appList = _apps->children(); 45 QList<AppLnk> appList = _apps->children();
41 for ( AppLnk *app = appList.first(); app != 0; app = appList.next() ){ 46 for ( AppLnk *app = appList.first(); app != 0; app = appList.next() ){
42 if ( (_search.match( app->name() ) != -1) 47 if ( (_search.match( app->name() ) != -1)
43 || (_search.match(app->comment()) != -1) 48 || (_search.match(app->comment()) != -1)
44 || (_search.match(app->exec()) != -1) ) { 49 || (_search.match(app->exec()) != -1) ) {
45 count++; 50 count++;
46 insertItem( app ); 51 insertItem( app );
47 } 52 }
53 qApp->processEvents( 100 );
48 } 54 }
49 return count; 55 return count;
50} 56}
51 57
52void AppLnkSearch::insertItem( void *rec ) 58void AppLnkSearch::insertItem( void *rec )
53{ 59{
54 new AppLnkItem( this, (AppLnk*)rec ); 60 new AppLnkItem( this, (AppLnk*)rec );
55} 61}
56 62
57void AppLnkSearch::setSearch(QRegExp re) 63void AppLnkSearch::setSearch(QRegExp re)
58{ 64{
59 expanded = false;
60 setOpen( false ); 65 setOpen( false );
61 SearchGroup::setSearch( re ); 66 SearchGroup::setSearch( re );
62} 67}
63 68