summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/osearch/adresssearch.cpp5
-rw-r--r--core/pim/osearch/applnksearch.cpp7
-rw-r--r--core/pim/osearch/contactitem.cpp37
-rw-r--r--core/pim/osearch/datebooksearch.cpp6
-rw-r--r--core/pim/osearch/doclnksearch.cpp5
-rw-r--r--core/pim/osearch/eventitem.cpp14
-rw-r--r--core/pim/osearch/mainwindow.cpp5
-rw-r--r--core/pim/osearch/todoitem.cpp16
-rw-r--r--core/pim/osearch/todosearch.cpp7
9 files changed, 49 insertions, 53 deletions
diff --git a/core/pim/osearch/adresssearch.cpp b/core/pim/osearch/adresssearch.cpp
index e1f575d..d260670 100644
--- a/core/pim/osearch/adresssearch.cpp
+++ b/core/pim/osearch/adresssearch.cpp
@@ -1,50 +1,49 @@
//
//
// C++ Implementation: $MODULE$
//
// Description:
//
//
// Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "adresssearch.h"
#include "contactitem.h"
-#include <qpe/resource.h>
+#include <opie2/oresource.h>
//#include <qwhatsthis.h>
using namespace Opie;
AdressSearch::AdressSearch(QListView* parent, QString name):
SearchGroup(parent, name)
{
_contacts = 0;
- QIconSet is = Resource::loadIconSet( "addressbook/AddressBook" );
- setPixmap( 0, is.pixmap( QIconSet::Large, true ) );
+ setPixmap( 0, Opie::Core::OResource::loadPixmap( "addressbook/AddressBook", Opie::Core::OResource::SmallIcon ) );
// QWhatsThis::add( this, QObject::tr("Search the addressbook") );
/* QPixmap pix = Resource::loadPixmap( "addressbook/AddressBook" );
QImage img = pix.convertToImage();
img.smoothScale( 14, 14 );
pix.convertFromImage( img );
setPixmap( 0, pix );*/
}
AdressSearch::~AdressSearch()
{
delete _contacts;
}
void AdressSearch::load()
{
_contacts = new OPimContactAccess("osearch");
}
int AdressSearch::search()
{
OPimRecordList<OPimContact> results = _contacts->matchRegexp(_search);
diff --git a/core/pim/osearch/applnksearch.cpp b/core/pim/osearch/applnksearch.cpp
index 474dbb2..69170c9 100644
--- a/core/pim/osearch/applnksearch.cpp
+++ b/core/pim/osearch/applnksearch.cpp
@@ -1,50 +1,49 @@
//
//
// C++ Implementation: $MODULE$
//
// Description:
//
//
// Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "applnksearch.h"
#include "applnkitem.h"
+#include <opie2/oresource.h>
+
#include <qpe/applnk.h>
#include <qpe/qpeapplication.h>
-#include <qpe/resource.h>
AppLnkSearch::AppLnkSearch(QListView* parent, QString name): SearchGroup(parent, name)
{
_apps = 0;
- QIconSet is = Resource::loadIconSet( "osearch/applications" );
- //QIconSet is = Resource::loadIconSet( "AppsIcon" );
- setPixmap( 0, is.pixmap( QIconSet::Large, true ) );
+ setPixmap( 0, Opie::Core::OResource::loadPixmap( "osearch/applications", Opie::Core::OResource::SmallIcon ) );
}
AppLnkSearch::~AppLnkSearch()
{
delete _apps;
}
void AppLnkSearch::load()
{
_apps = new AppLnkSet(QPEApplication::qpeDir());
}
int AppLnkSearch::search()
{
QList<AppLnk> appList = _apps->children();
for ( AppLnk *app = appList.first(); app != 0; app = appList.next() ){
if ( (_search.match( app->name() ) != -1)
|| (_search.match(app->comment()) != -1)
|| (_search.match(app->exec()) != -1) ) {
insertItem( app );
}else
diff --git a/core/pim/osearch/contactitem.cpp b/core/pim/osearch/contactitem.cpp
index c89c6e2..81b6359 100644
--- a/core/pim/osearch/contactitem.cpp
+++ b/core/pim/osearch/contactitem.cpp
@@ -1,129 +1,130 @@
//
//
// C++ Implementation: $MODULE$
//
// Description:
//
//
// Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "contactitem.h"
-#include <qpe/resource.h>
+#include <opie2/oresource.h>
+
#include <qpe/qcopenvelope_qws.h>
using namespace Opie;
ContactItem::ContactItem(OListViewItem* parent, OPimContact *contact)
: ResultItem(parent)
{
_contact = contact;
setText(0, _contact->toShortText());
setIcon();
}
void ContactItem::setIcon()
{
QPixmap icon;
switch ( _contact->lastHitField() ) {
case -1:
- icon = Resource::loadPixmap( "reset" );
+ icon = Opie::Core::OResource::loadPixmap( "reset", Opie::Core::OResource::SmallIcon );
break;
case Qtopia::BusinessPhone:
- icon = Resource::loadPixmap( "addressbook/phonework" );
+ icon = Opie::Core::OResource::loadPixmap( "addressbook/phonework", Opie::Core::OResource::SmallIcon );
break;
case Qtopia::BusinessFax:
- icon = Resource::loadPixmap( "addressbook/faxwork" );
+ icon = Opie::Core::OResource::loadPixmap( "addressbook/faxwork", Opie::Core::OResource::SmallIcon );
break;
case Qtopia::BusinessMobile:
- icon = Resource::loadPixmap( "addressbook/mobilework" );
+ icon = Opie::Core::OResource::loadPixmap( "addressbook/mobilework", Opie::Core::OResource::SmallIcon );
break;
case Qtopia::DefaultEmail:
case Qtopia::Emails:
- icon = Resource::loadPixmap( "addressbook/email" );
+ icon = Opie::Core::OResource::loadPixmap( "addressbook/email", Opie::Core::OResource::SmallIcon );
break;
case Qtopia::HomePhone:
- icon = Resource::loadPixmap( "addressbook/phonehome" );
+ icon = Opie::Core::OResource::loadPixmap( "addressbook/phonehome", Opie::Core::OResource::SmallIcon );
break;
case Qtopia::HomeFax:
- icon = Resource::loadPixmap( "addressbook/faxhome" );
+ icon = Opie::Core::OResource::loadPixmap( "addressbook/faxhome", Opie::Core::OResource::SmallIcon );
break;
case Qtopia::HomeMobile:
- icon = Resource::loadPixmap( "addressbook/mobilehome" );
+ icon = Opie::Core::OResource::loadPixmap( "addressbook/mobilehome", Opie::Core::OResource::SmallIcon );
break;
case Qtopia::HomeWebPage:
- icon = Resource::loadPixmap( "addressbook/webpagehome" );
+ icon = Opie::Core::OResource::loadPixmap( "addressbook/webpagehome", Opie::Core::OResource::SmallIcon );
break;
case Qtopia::BusinessWebPage:
- icon = Resource::loadPixmap( "addressbook/webpagework" );
+ icon = Opie::Core::OResource::loadPixmap( "addressbook/webpagework", Opie::Core::OResource::SmallIcon );
break;
case Qtopia::Title:
case Qtopia::JobTitle:
case Qtopia::FirstName:
case Qtopia::MiddleName:
case Qtopia::LastName:
case Qtopia::Suffix:
case Qtopia::Nickname:
case Qtopia::FileAs:
- icon = Resource::loadPixmap( "addressbook/identity" );
+ icon = Opie::Core::OResource::loadPixmap( "addressbook/identity", Opie::Core::OResource::SmallIcon );
break;
case Qtopia::HomeStreet:
case Qtopia::HomeCity:
case Qtopia::HomeState:
case Qtopia::HomeZip:
case Qtopia::HomeCountry:
- icon = Resource::loadPixmap( "osearch/addresshome" );
+ icon = Opie::Core::OResource::loadPixmap( "osearch/addresshome", Opie::Core::OResource::SmallIcon );
break;
case Qtopia::Company:
case Qtopia::BusinessCity:
case Qtopia::BusinessStreet:
case Qtopia::BusinessZip:
case Qtopia::BusinessCountry:
case Qtopia::Department:
case Qtopia::Office:
case Qtopia::Manager:
case Qtopia::BusinessPager:
case Qtopia::Profession:
- icon = Resource::loadPixmap( "osearch/addresshome" );
+ icon = Opie::Core::OResource::loadPixmap( "osearch/addresshome", Opie::Core::OResource::SmallIcon );
break;
case Qtopia::Assistant:
case Qtopia::Spouse:
case Qtopia::Children:
- icon = Resource::loadPixmap( "osearch/personal" );
+ icon = Opie::Core::OResource::loadPixmap( "osearch/personal", Opie::Core::OResource::SmallIcon );
break;
case Qtopia::Birthday:
case Qtopia::Anniversary:
- icon = Resource::loadPixmap( "osearch/clock" );
+ icon = Opie::Core::OResource::loadPixmap( "osearch/clock", Opie::Core::OResource::SmallIcon );
break;
case Qtopia::Notes:
- icon = Resource::loadPixmap( "txt" );
+ icon = Opie::Core::OResource::loadPixmap( "txt", Opie::Core::OResource::SmallIcon );
break;
default:
- icon = Resource::loadPixmap( "DocsIcon" );
+ icon = Opie::Core::OResource::loadPixmap( "DocsIcon", Opie::Core::OResource::SmallIcon );
break;
}
setPixmap( 0, icon );
}
ContactItem::~ContactItem()
{
delete _contact;
}
QString ContactItem::toRichText()
{
return _contact->toRichText();
}
void ContactItem::action( int act )
{
if (act == 0){
QCopEnvelope e("QPE/Application/addressbook", "show(int)");
e << _contact->uid();
}else if(act == 1){
QCopEnvelope e("QPE/Application/addressbook", "edit(int)");
e << _contact->uid();
diff --git a/core/pim/osearch/datebooksearch.cpp b/core/pim/osearch/datebooksearch.cpp
index ef3b006..13df6bf 100644
--- a/core/pim/osearch/datebooksearch.cpp
+++ b/core/pim/osearch/datebooksearch.cpp
@@ -1,56 +1,56 @@
//
//
// C++ Implementation: $MODULE$
//
// Description:
//
//
// Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "datebooksearch.h"
#include "eventitem.h"
#include <opie2/odebug.h>
#include <opie2/opimevent.h>
#include <opie2/opimrecurrence.h>
+#include <opie2/oresource.h>
-#include <qpe/resource.h>
#include <qpe/config.h>
#include <qaction.h>
#include <qpopupmenu.h>
DatebookSearch::DatebookSearch(QListView* parent, QString name)
: SearchGroup(parent, name), _dates(0), _popupMenu(0)
{
- QIconSet is = Resource::loadIconSet( "datebook/DateBook" );
- setPixmap( 0, is.pixmap( QIconSet::Large, true ) );
+ setPixmap( 0, Opie::Core::OResource::loadPixmap( "datebook/DateBook", Opie::Core::OResource::SmallIcon ) );
+
actionShowPastEvents = new QAction( QObject::tr("Show past events"),QString::null, 0, 0, 0, true );
actionSearchInDates = new QAction( QObject::tr("Search in dates"),QString::null, 0, 0, 0, true );
Config cfg( "osearch", Config::User );
cfg.setGroup( "datebook_settings" );
actionShowPastEvents->setOn( cfg.readBoolEntry( "show_past_events", false ) );
actionSearchInDates->setOn( cfg.readBoolEntry( "search_in_dates", true ) );
}
DatebookSearch::~DatebookSearch()
{
odebug << "SAVE DATEBOOK SEARCH CONFIG" << oendl;
Config cfg( "osearch", Config::User );
cfg.setGroup( "datebook_settings" );
cfg.writeEntry( "show_past_events", actionShowPastEvents->isOn() );
cfg.writeEntry( "search_in_dates", actionSearchInDates->isOn() );
delete _dates;
delete _popupMenu;
delete actionShowPastEvents;
delete actionSearchInDates;
}
void DatebookSearch::load()
{
diff --git a/core/pim/osearch/doclnksearch.cpp b/core/pim/osearch/doclnksearch.cpp
index 3d91c1f..9d165be 100644
--- a/core/pim/osearch/doclnksearch.cpp
+++ b/core/pim/osearch/doclnksearch.cpp
@@ -1,59 +1,58 @@
//
//
// C++ Implementation: $MODULE$
//
// Description:
//
//
// Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "doclnkitem.h"
#include "doclnksearch.h"
+#include <opie2/oresource.h>
#include <opie2/owait.h>
#include <qpe/applnk.h>
#include <qpe/config.h>
-#include <qpe/resource.h>
#include <qpe/qpeapplication.h>
#include <qaction.h>
#include <qfile.h>
#include <qpopupmenu.h>
#include <qtextstream.h>
DocLnkSearch::DocLnkSearch(QListView* parent, QString name)
: AppLnkSearch(parent, name), _popupMenu(0)
{
- QIconSet is = Resource::loadIconSet( "osearch/documents" );
- setPixmap( 0, is.pixmap( QIconSet::Large, true ) );
+ setPixmap( 0, Opie::Core::OResource::loadPixmap( "osearch/documents", Opie::Core::OResource::SmallIcon ) );
actionSearchInFiles = new QAction( QObject::tr("Search content"),QString::null, 0, 0, 0, true );
Config cfg( "osearch", Config::User );
cfg.setGroup( "doclnk_settings" );
actionSearchInFiles->setOn( cfg.readBoolEntry( "search_content", false ) );
}
DocLnkSearch::~DocLnkSearch()
{
Config cfg( "osearch", Config::User );
cfg.setGroup( "doclnk_settings" );
cfg.writeEntry( "search_content", actionSearchInFiles->isOn() );
}
void DocLnkSearch::load()
{
_apps = new DocLnkSet(QPEApplication::documentDir());
}
bool DocLnkSearch::searchFile( AppLnk *app )
{
if (!actionSearchInFiles->isOn()) return false;
DocLnk *doc = (DocLnk*)app;
diff --git a/core/pim/osearch/eventitem.cpp b/core/pim/osearch/eventitem.cpp
index 7bcf340..36adc63 100644
--- a/core/pim/osearch/eventitem.cpp
+++ b/core/pim/osearch/eventitem.cpp
@@ -1,85 +1,85 @@
//
//
// C++ Implementation: $MODULE$
//
// Description:
//
//
// Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "eventitem.h"
+#include <opie2/oresource.h>
-#include <qpe/resource.h>
#include <qpe/qcopenvelope_qws.h>
using namespace Opie;
EventItem::EventItem(OListViewItem* parent, OPimEvent *event)
: ResultItem(parent)
{
_event = event;
setText(0, _event->toShortText() );
setIcon();
}
EventItem::~EventItem()
{
}
QString EventItem::toRichText()
{
return _event->toRichText();
}
void EventItem::action( int act )
{
if (act == 0){
QCopEnvelope e("QPE/Application/datebook", "viewDefault(QDate)");
e << _event->startDateTime().date();
}else if(act == 1){
QCopEnvelope e("QPE/Application/datebook", "editEvent(int)");
e << _event->uid();
}
}
QIntDict<QString> EventItem::actions()
{
QIntDict<QString> result;
result.insert( 0, new QString( QObject::tr("show") ) );
result.insert( 1, new QString( QObject::tr("edit") ) );
return result;
}
void EventItem::setIcon()
{
QPixmap icon;
switch ( _event->lastHitField() ) {
case -1:
- icon = Resource::loadPixmap( "reset" );
+ icon = Opie::Core::OResource::loadPixmap( "reset", Opie::Core::OResource::SmallIcon );
// QWhatsThis::add( icon, QObject::tr("Enter your search terms here") );
break;
case Qtopia::DatebookDescription:
- icon = Resource::loadPixmap( "osearch/summary" );
+ icon = Opie::Core::OResource::loadPixmap( "osearch/summary", Opie::Core::OResource::SmallIcon );
break;
case Qtopia::Notes:
- icon = Resource::loadPixmap( "txt" );
+ icon = Opie::Core::OResource::loadPixmap( "txt", Opie::Core::OResource::SmallIcon );
break;
case Qtopia::Location:
- icon = Resource::loadPixmap( "home" );
+ icon = Opie::Core::OResource::loadPixmap( "home", Opie::Core::OResource::SmallIcon );
break;
case Qtopia::StartDateTime:
case Qtopia::EndDateTime:
- icon = Resource::loadPixmap( "osearch/clock" );
+ icon = Opie::Core::OResource::loadPixmap( "osearch/clock", Opie::Core::OResource::SmallIcon );
break;
default:
- icon = Resource::loadPixmap( "DocsIcon" );
+ icon = Opie::Core::OResource::loadPixmap( "DocsIcon", Opie::Core::OResource::SmallIcon );
break;
}
setPixmap( 0, icon );
}
diff --git a/core/pim/osearch/mainwindow.cpp b/core/pim/osearch/mainwindow.cpp
index 1d0331c..d71b167 100644
--- a/core/pim/osearch/mainwindow.cpp
+++ b/core/pim/osearch/mainwindow.cpp
@@ -1,54 +1,53 @@
/***************************************************************************
* *
* 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 "olistview.h"
#include "olistviewitem.h"
#include "resultitem.h"
#include "adresssearch.h"
#include "todosearch.h"
#include "datebooksearch.h"
#include "applnksearch.h"
#include "doclnksearch.h"
#include "mainwindow.h"
#include <opie2/odebug.h>
+#include <opie2/oresource.h>
#include <opie2/owait.h>
#include <qpe/qpemessagebox.h>
-#include <qpe/resource.h>
#include <qpe/config.h>
-
#include <qpe/qpeapplication.h>
#include <qpe/global.h>
#include <qtoolbar.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 <qhbox.h>
#include <qpushbutton.h>
#include <qintdict.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <qsignalmapper.h>
#include <qtextbrowser.h>
#include <qregexp.h>
#include <qwhatsthis.h>
#include <qmenubar.h>
@@ -144,49 +143,49 @@ void MainWindow::makeMenu()
QMenuBar *menuBar = new QMenuBar( toolBar );
QPopupMenu *searchMenu = new QPopupMenu( menuBar );
// QPopupMenu *viewMenu = new QPopupMenu( menuBar );
QPopupMenu *cfgMenu = new QPopupMenu( menuBar );
QPopupMenu *searchOptions = new QPopupMenu( cfgMenu );
setToolBarsMovable( false );
toolBar->setHorizontalStretchable( true );
menuBar->insertItem( tr( "Search" ), searchMenu );
menuBar->insertItem( tr( "Settings" ), cfgMenu );
//SETTINGS MENU
cfgMenu->insertItem( tr( "Search" ), searchOptions );
QPopupMenu *pop;
for (SearchGroup *s = searches.first(); s != 0; s = searches.next() ){
pop = s->popupMenu();
if (pop){
cfgMenu->insertItem( s->text(0), pop );
}
}
//SEARCH
SearchAllAction = new QAction( tr("Search all"),QString::null, 0, this, 0 );
- SearchAllAction->setIconSet( Resource::loadIconSet( "find" ) );
+ SearchAllAction->setIconSet( Opie::Core::OResource::loadPixmap( "find", Opie::Core::OResource::SmallIcon ) );
// QWhatsThis::add( SearchAllAction, tr("Search everything...") );
connect( SearchAllAction, SIGNAL(activated()), this, SLOT(searchAll()) );
SearchAllAction->addTo( searchMenu );
searchMenu->insertItem( tr( "Options" ), searchOptions );
//SEARCH OPTIONS
//actionWholeWordsOnly = new QAction( tr("Whole words only"),QString::null, 0, this, 0, true );
//actionWholeWordsOnly->addTo( searchOptions );
actionCaseSensitiv = new QAction( tr("Case sensitive"),QString::null, 0, this, 0, true );
actionCaseSensitiv->addTo( searchOptions );
actionWildcards = new QAction( tr("Use wildcards"),QString::null, 0, this, 0, true );
actionWildcards->addTo( searchOptions );
//SEARCH BAR
LabelEnterText = new QLabel( searchBar, "Label" );
LabelEnterText->setAutoMask( FALSE );
LabelEnterText->setText( tr( "Search for: " ) );
LabelEnterText->setFrameStyle( QFrame::NoFrame );
LabelEnterText->setBackgroundMode( PaletteButton );
addToolBar( searchBar, "Search", QMainWindow::Top, TRUE );
QLineEdit *searchEdit = new QLineEdit( searchBar, "seachEdit" );
QWhatsThis::add( searchEdit, tr("Enter your search terms here") );
searchEdit->setFocus();
diff --git a/core/pim/osearch/todoitem.cpp b/core/pim/osearch/todoitem.cpp
index 34e790a..9172344 100644
--- a/core/pim/osearch/todoitem.cpp
+++ b/core/pim/osearch/todoitem.cpp
@@ -1,83 +1,81 @@
//
//
// C++ Implementation: $MODULE$
//
// Description:
//
//
// Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "todoitem.h"
+#include <opie2/oresource.h>
-#include <qpe/resource.h>
#include <qpe/qcopenvelope_qws.h>
-
-
using namespace Opie;
TodoItem::TodoItem(OListViewItem* parent, OPimTodo *todo)
: ResultItem(parent)
{
_todo = todo;
setText( 0, todo->toShortText() );
setIcon();
}
TodoItem::~TodoItem()
{
delete _todo;
}
QString TodoItem::toRichText()
{
return _todo->toRichText();
}
void TodoItem::action( int act )
{
if (act == 0){
QCopEnvelope e("QPE/Application/todolist", "show(int)");
e << _todo->uid();
}else if (act == 1){
QCopEnvelope e("QPE/Application/todolist", "edit(int)");
e << _todo->uid();
}
}
QIntDict<QString> TodoItem::actions()
{
QIntDict<QString> result;
result.insert( 0, new QString( QObject::tr("show") ) );
result.insert( 1, new QString( QObject::tr("edit") ) );
return result;
}
void TodoItem::setIcon()
{
QPixmap icon;
switch ( _todo->lastHitField() ) {
case -1:
- icon = Resource::loadPixmap( "reset" );
+ icon = Opie::Core::OResource::loadPixmap( "reset", Opie::Core::OResource::SmallIcon );
break;
case OPimTodo::Description:
- icon = Resource::loadPixmap( "txt" );
+ icon = Opie::Core::OResource::loadPixmap( "txt", Opie::Core::OResource::SmallIcon );
break;
case OPimTodo::Summary:
- icon = Resource::loadPixmap( "osearch/summary" );
+ icon = Opie::Core::OResource::loadPixmap( "osearch/summary", Opie::Core::OResource::SmallIcon );
break;
case OPimTodo::Priority:
- icon = Resource::loadPixmap( "todo/priority1" );
+ icon = Opie::Core::OResource::loadPixmap( "todo/priority1", Opie::Core::OResource::SmallIcon );
break;
case OPimTodo::HasDate:
- icon = Resource::loadPixmap( "osearch/clock" );
+ icon = Opie::Core::OResource::loadPixmap( "osearch/clock", Opie::Core::OResource::SmallIcon );
break;
default:
- icon = Resource::loadPixmap( "DocsIcon" );
+ icon = Opie::Core::OResource::loadPixmap( "DocsIcon", Opie::Core::OResource::SmallIcon );
break;
}
setPixmap( 0, icon );
}
diff --git a/core/pim/osearch/todosearch.cpp b/core/pim/osearch/todosearch.cpp
index 1ed7370..8a9ae39 100644
--- a/core/pim/osearch/todosearch.cpp
+++ b/core/pim/osearch/todosearch.cpp
@@ -1,53 +1,54 @@
//
//
// C++ Implementation: $MODULE$
//
// Description:
//
//
// Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "todosearch.h"
#include "todoitem.h"
-#include <qpe/resource.h>
+#include <opie2/oresource.h>
+
#include <qpe/config.h>
#include <qaction.h>
#include <qpopupmenu.h>
using namespace Opie;
TodoSearch::TodoSearch(QListView* parent, QString name)
: SearchGroup(parent, name), _todos(0), _popupMenu(0)
{
// AppLnkSet als(QPEApplication::qpeDir());
// setPixmap( 0, als.findExec("todolist")->pixmap() );
- QIconSet is = Resource::loadIconSet( "todo/TodoList" );
- setPixmap( 0, is.pixmap( QIconSet::Large, true ) );
+ setPixmap( 0, Opie::Core::OResource::loadPixmap( "todo/TodoList", Opie::Core::OResource::SmallIcon ) );
+
actionShowCompleted = new QAction( QObject::tr("Show completed tasks"),QString::null, 0, 0, 0, true );
Config cfg( "osearch", Config::User );
cfg.setGroup( "todo_settings" );
actionShowCompleted->setOn( cfg.readBoolEntry( "show_completed_tasks", false ) );
}
TodoSearch::~TodoSearch()
{
Config cfg( "osearch", Config::User );
cfg.setGroup( "todo_settings" );
cfg.writeEntry( "show_completed_tasks", actionShowCompleted->isOn() );
delete _popupMenu;
delete actionShowCompleted;
delete _todos;
}
void TodoSearch::load()
{
_todos = new OPimTodoAccess();
_todos->load();
}