summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/osearch/contactitem.cpp4
-rw-r--r--core/pim/osearch/datebooksearch.cpp17
-rw-r--r--core/pim/osearch/searchgroup.h1
-rw-r--r--core/pim/osearch/todoitem.cpp6
-rw-r--r--core/pim/osearch/todosearch.cpp15
5 files changed, 5 insertions, 38 deletions
diff --git a/core/pim/osearch/contactitem.cpp b/core/pim/osearch/contactitem.cpp
index 29d81be..788a415 100644
--- a/core/pim/osearch/contactitem.cpp
+++ b/core/pim/osearch/contactitem.cpp
@@ -17,35 +17,35 @@
ContactItem::ContactItem(OListViewItem* parent, OContact *contact)
: ResultItem(parent)
{
_contact = contact;
setText(0, _contact->toShortText());
}
ContactItem::~ContactItem()
{
delete _contact;
}
QString ContactItem::toRichText()
{
return _contact->toRichText();
}
void ContactItem::editItem()
{
QCopEnvelope e("QPE/Application/addressbook", "edit(int)");
-// QCopEnvelope e("QPE/Addressbook", "editEvent(int)");
+// QCopEnvelope e("QPE/Addressbook", "edit(int)");
e << _contact->uid();
}
void ContactItem::showItem()
{
QCopEnvelope e("QPE/Application/addressbook", "show(int)");
-// QCopEnvelope e("QPE/Addressbook", "viewDefault(QDate)");
+// QCopEnvelope e("QPE/Addressbook", "show(int)");
e << _contact->uid();
}
diff --git a/core/pim/osearch/datebooksearch.cpp b/core/pim/osearch/datebooksearch.cpp
index 0590252..83b99f5 100644
--- a/core/pim/osearch/datebooksearch.cpp
+++ b/core/pim/osearch/datebooksearch.cpp
@@ -16,48 +16,31 @@
#include <opie/oevent.h>
#include <opie/odatebookaccess.h>
DatebookSearch::DatebookSearch(QListView* parent, QString name)
: SearchGroup(parent, name)
{
_dates = 0;
}
DatebookSearch::~DatebookSearch()
{
delete _dates;
}
void DatebookSearch::expand()
{
SearchGroup::expand();
if (!_dates){
_dates = new ODateBookAccess();
_dates->load();
}
-#ifdef LIPBOPIE_SEARCH
ORecordList<OEvent> results = _dates->matchRegexp(_search);
setText(0, text(0) + " (" + QString::number( results.count() ) + ")" );
for (uint i = 0; i < results.count(); i++) {
new EventItem( this, new OEvent( results[i] ));
}
-#else
- ORecordList<OEvent> list = _dates->allRecords();
- QArray<int> m_currentQuery( list.count() );
- for( uint i=0; i<list.count(); i++ ){
- //qDebug("datebook: %s",list[i].description().latin1() );
- if (
- ( list[i].description().contains( _search ) ) ||
- ( list[i].note().contains( _search ) ) ||
- ( list[i].location().contains( _search ) )
- ){
- //qDebug("FOUND");
- new EventItem( this, new OEvent( list[i] ) );
- }
-
- }
-#endif
}
diff --git a/core/pim/osearch/searchgroup.h b/core/pim/osearch/searchgroup.h
index 4195e6f..d26ff17 100644
--- a/core/pim/osearch/searchgroup.h
+++ b/core/pim/osearch/searchgroup.h
@@ -1,43 +1,42 @@
//
//
// C++ Interface: $MODULE$
//
// Description:
//
//
// Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef SEARCHGROUP_H
#define SEARCHGROUP_H
#include "olistviewitem.h"
#include <qregexp.h>
-#define LIPBOPIE_SEARCH
/**
@author Patrick S. Vogt
*/
class SearchGroup : public OListViewItem
{
public:
SearchGroup(QListView* parent, QString name);
~SearchGroup();
virtual void expand();
virtual void setSearch(QString);
virtual void setSearch(QRegExp);
virtual int rtti() { return Searchgroup;}
protected:
QRegExp _search;
private:
QString _name;
bool expanded;
};
#endif
diff --git a/core/pim/osearch/todoitem.cpp b/core/pim/osearch/todoitem.cpp
index 4ea4586..145b423 100644
--- a/core/pim/osearch/todoitem.cpp
+++ b/core/pim/osearch/todoitem.cpp
@@ -21,34 +21,34 @@ TodoItem::TodoItem(OListViewItem* parent, OTodo *todo)
_todo = todo;
setText( 0, todo->toShortText() );
}
TodoItem::~TodoItem()
{
delete _todo;
}
void TodoItem::expand()
{
ResultItem::expand();
}
QString TodoItem::toRichText()
{
return _todo->toRichText();
}
void TodoItem::showItem()
{
// QCopEnvelope e("QPE/Todolist", "show(int)");
- qDebug("calling todolist for %i",_todo->uid());
- QCopEnvelope e("QPE/Todolist", "show(int)");
+ QCopEnvelope e("QPE/Application/todolist", "show(int)");
e << _todo->uid();
}
void TodoItem::editItem()
{
- QCopEnvelope e("QPE/Todolist", "edit(int)");
+// QCopEnvelope e("QPE/Todolist", "edit(int)");
+ QCopEnvelope e("QPE/Application/todolist", "edit(int)");
e << _todo->uid();
}
diff --git a/core/pim/osearch/todosearch.cpp b/core/pim/osearch/todosearch.cpp
index fba8aa0..cbe356b 100644
--- a/core/pim/osearch/todosearch.cpp
+++ b/core/pim/osearch/todosearch.cpp
@@ -1,66 +1,51 @@
//
//
// 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 <opie/otodoaccess.h>
#include <opie/otodo.h>
-#include <qdir.h>
#include "todoitem.h"
TodoSearch::TodoSearch(QListView* parent, QString name)
: SearchGroup(parent, name)
{
- //_fileName = QDir::homeDirPath()+"/Applications/todolist/todolist.xml";
_todos = 0;
}
TodoSearch::~TodoSearch()
{
delete _todos;
}
void TodoSearch::expand()
{
SearchGroup::expand();
if (_search.isEmpty()) return;
if (!_todos){
_todos = new OTodoAccess();
_todos->load();
}
-#ifdef LIPBOPIE_SEARCH
ORecordList<OTodo> results = _todos->matchRegexp(_search);
setText(0, text(0) + " (" + QString::number( results.count() ) + ")");
for (uint i = 0; i < results.count(); i++) {
new TodoItem( this, new OTodo( results[i] ));
}
-#else
- ORecordList<OTodo> list = _todos->allRecords();
- QArray<int> m_currentQuery( list.count() );
- for( uint i=0; i<list.count(); i++ ){
- // qDebug("todo: %s",list[i].summary().latin1() );
- if ( list[i].match( _search ) ){
- // qDebug("FOUND");
- new TodoItem( this, new OTodo( list[i] ) );
- }
-
- }
-#endif
}