summaryrefslogtreecommitdiff
path: root/core/pim/osearch
Side-by-side diff
Diffstat (limited to 'core/pim/osearch') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/osearch/adresssearch.cpp2
-rw-r--r--core/pim/osearch/applnkitem.cpp1
-rw-r--r--core/pim/osearch/applnksearch.cpp1
-rw-r--r--core/pim/osearch/contactitem.cpp1
-rw-r--r--core/pim/osearch/datebooksearch.cpp2
-rw-r--r--core/pim/osearch/doclnkitem.cpp1
-rw-r--r--core/pim/osearch/doclnksearch.cpp1
-rw-r--r--core/pim/osearch/eventitem.cpp2
-rw-r--r--core/pim/osearch/main.cpp1
-rw-r--r--core/pim/osearch/mainwindow.cpp2
-rw-r--r--core/pim/osearch/olistview.cpp1
-rw-r--r--core/pim/osearch/resultitem.cpp1
-rw-r--r--core/pim/osearch/searchgroup.cpp3
-rw-r--r--core/pim/osearch/todoitem.cpp1
-rw-r--r--core/pim/osearch/todosearch.cpp1
15 files changed, 1 insertions, 20 deletions
diff --git a/core/pim/osearch/adresssearch.cpp b/core/pim/osearch/adresssearch.cpp
index dbd6df6..6891f03 100644
--- a/core/pim/osearch/adresssearch.cpp
+++ b/core/pim/osearch/adresssearch.cpp
@@ -1,43 +1,41 @@
//
//
// 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 <qstring.h>
-#include <qiconset.h>
//#include <qwhatsthis.h>
AdressSearch::AdressSearch(QListView* parent, QString name):
SearchGroup(parent, name)
{
_contacts = 0;
QIconSet is = Resource::loadIconSet( "addressbook/AddressBookSmall" );
setPixmap( 0, is.pixmap( QIconSet::Large, true ) );
// 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;
}
diff --git a/core/pim/osearch/applnkitem.cpp b/core/pim/osearch/applnkitem.cpp
index 06c2b1e..19e765e 100644
--- a/core/pim/osearch/applnkitem.cpp
+++ b/core/pim/osearch/applnkitem.cpp
@@ -1,42 +1,41 @@
//
//
// C++ Implementation: $MODULE$
//
// Description:
//
//
// Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "applnkitem.h"
#include <qpe/applnk.h>
#include <qpe/qcopenvelope_qws.h>
-#include <qfileinfo.h>
AppLnkItem::AppLnkItem(OListViewItem* parent, AppLnk *app)
: ResultItem(parent)
{
_app = app;
setText(0, _app->name() );
setPixmap(0, _app->pixmap() );
}
AppLnkItem::~AppLnkItem()
{
}
QString AppLnkItem::toRichText()
{
QString text;
text += "<b><h3>" + _app->name() + "</b></h3><br>";
text += _app->comment() + "<br>";
text += "<br>`" + _app->exec() + "`<br>";
text += "<br>`" + _app->file() + "`<br>";
text += "<br>`" + _app->linkFile() + "`<br>";
return text;
diff --git a/core/pim/osearch/applnksearch.cpp b/core/pim/osearch/applnksearch.cpp
index 1c84d66..758baf2 100644
--- a/core/pim/osearch/applnksearch.cpp
+++ b/core/pim/osearch/applnksearch.cpp
@@ -1,44 +1,43 @@
//
//
// 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 <qpe/applnk.h>
#include <qpe/qpeapplication.h>
#include <qpe/resource.h>
-#include <qiconset.h>
AppLnkSearch::AppLnkSearch(QListView* parent, QString name): SearchGroup(parent, name)
{
_apps = 0;
QIconSet is = Resource::loadIconSet( "osearch/applicationsSmall" );
//QIconSet is = Resource::loadIconSet( "AppsIcon" );
setPixmap( 0, is.pixmap( QIconSet::Large, true ) );
}
AppLnkSearch::~AppLnkSearch()
{
delete _apps;
}
void AppLnkSearch::load()
{
_apps = new AppLnkSet(QPEApplication::qpeDir());
}
int AppLnkSearch::search()
{
QList<AppLnk> appList = _apps->children();
diff --git a/core/pim/osearch/contactitem.cpp b/core/pim/osearch/contactitem.cpp
index eedc374..639af46 100644
--- a/core/pim/osearch/contactitem.cpp
+++ b/core/pim/osearch/contactitem.cpp
@@ -1,42 +1,41 @@
//
//
// 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 <qpe/qcopenvelope_qws.h>
-#include <qpixmap.h>
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" );
break;
case Qtopia::BusinessPhone:
icon = Resource::loadPixmap( "addressbook/phonework" );
break;
case Qtopia::BusinessFax:
icon = Resource::loadPixmap( "addressbook/faxwork" );
break;
case Qtopia::BusinessMobile:
diff --git a/core/pim/osearch/datebooksearch.cpp b/core/pim/osearch/datebooksearch.cpp
index 2b4660a..eeea54b 100644
--- a/core/pim/osearch/datebooksearch.cpp
+++ b/core/pim/osearch/datebooksearch.cpp
@@ -1,49 +1,47 @@
//
//
// 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/opimevent.h>
#include <opie2/opimrecurrence.h>
#include <qpe/resource.h>
#include <qpe/config.h>
-#include <qiconset.h>
#include <qaction.h>
-#include <qdatetime.h>
#include <qpopupmenu.h>
DatebookSearch::DatebookSearch(QListView* parent, QString name)
: SearchGroup(parent, name), _dates(0), _popupMenu(0)
{
QIconSet is = Resource::loadIconSet( "datebook/DateBookSmall" );
setPixmap( 0, is.pixmap( QIconSet::Large, true ) );
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()
{
qDebug("SAVE DATEBOOK SEARCH CONFIG");
Config cfg( "osearch", Config::User );
cfg.setGroup( "datebook_settings" );
cfg.writeEntry( "show_past_events", actionShowPastEvents->isOn() );
cfg.writeEntry( "search_in_dates", actionSearchInDates->isOn() );
diff --git a/core/pim/osearch/doclnkitem.cpp b/core/pim/osearch/doclnkitem.cpp
index 1516b8e..df8e856 100644
--- a/core/pim/osearch/doclnkitem.cpp
+++ b/core/pim/osearch/doclnkitem.cpp
@@ -1,42 +1,41 @@
//
//
// 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 <qpe/applnk.h>
#include <qpe/qcopenvelope_qws.h>
-#include <qfile.h>
#include <qtextstream.h>
#include <qfileinfo.h>
DocLnkItem::DocLnkItem(OListViewItem* parent, DocLnk *app)
: ResultItem(parent)
{
_doc = app;
setText(0, _doc->name() );
setPixmap(0, _doc->pixmap() );
}
DocLnkItem::~DocLnkItem()
{
}
QString DocLnkItem::toRichText()
{
QString text;
text += "<b><h3>" + _doc->name() + "</b></h3><br>";
text += _doc->comment() + "<br>";
text += QObject::tr("File: ") + _doc->file() + "<br>";
text += QObject::tr("Link: ") + _doc->linkFile() + "<br>";
text += QObject::tr("Mimetype: ") + _doc->type() + "<br>";
if ( _doc->type().contains( "text" ) ){
diff --git a/core/pim/osearch/doclnksearch.cpp b/core/pim/osearch/doclnksearch.cpp
index c73dcbf..3f0d223 100644
--- a/core/pim/osearch/doclnksearch.cpp
+++ b/core/pim/osearch/doclnksearch.cpp
@@ -3,49 +3,48 @@
// 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/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 <qiconset.h>
#include <qpopupmenu.h>
#include <qtextstream.h>
DocLnkSearch::DocLnkSearch(QListView* parent, QString name)
: AppLnkSearch(parent, name), _popupMenu(0)
{
QIconSet is = Resource::loadIconSet( "osearch/documentsSmall" );
setPixmap( 0, is.pixmap( QIconSet::Automatic, true ) );
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() );
}
diff --git a/core/pim/osearch/eventitem.cpp b/core/pim/osearch/eventitem.cpp
index f6e34fe..8dcfc70 100644
--- a/core/pim/osearch/eventitem.cpp
+++ b/core/pim/osearch/eventitem.cpp
@@ -1,44 +1,42 @@
//
//
// 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 <qpe/resource.h>
#include <qpe/qcopenvelope_qws.h>
-#include <qdatetime.h>
-#include <qpixmap.h>
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)");
diff --git a/core/pim/osearch/main.cpp b/core/pim/osearch/main.cpp
index 9a03818..e0a2de3 100644
--- a/core/pim/osearch/main.cpp
+++ b/core/pim/osearch/main.cpp
@@ -1,7 +1,6 @@
#include "mainwindow.h"
-#include <qpe/qpeapplication.h>
#include <opie/oapplicationfactory.h>
OPIE_EXPORT_APP( OApplicationFactory<MainWindow> )
diff --git a/core/pim/osearch/mainwindow.cpp b/core/pim/osearch/mainwindow.cpp
index 95f5967..bfe95b0 100644
--- a/core/pim/osearch/mainwindow.cpp
+++ b/core/pim/osearch/mainwindow.cpp
@@ -5,50 +5,50 @@
* 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/owait.h>
#include <qpe/qpemessagebox.h>
#include <qpe/resource.h>
#include <qpe/config.h>
+
#include <qpe/qpeapplication.h>
-#include <qpe/config.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>
diff --git a/core/pim/osearch/olistview.cpp b/core/pim/osearch/olistview.cpp
index 7a7cb26..8fbb31d 100644
--- a/core/pim/osearch/olistview.cpp
+++ b/core/pim/osearch/olistview.cpp
@@ -1,40 +1,39 @@
/***************************************************************************
* *
* 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. Vogtp <tille@handhelds.org>
#include "olistview.h"
#include "olistviewitem.h"
#include <qpe/qpeapplication.h>
-#include <qmessagebox.h>
OListView::OListView(QWidget *parent, const char *name )
: QListView(parent,name)
{
setRootIsDecorated( true );
addColumn(tr("Results"),qApp->desktop()->width() - 9 );
//setColumnWidthMode(0, Manual);
setSorting( -1 );
connect( this, SIGNAL(expanded(QListViewItem*)), SLOT(expand(QListViewItem*)));
}
OListView::~OListView()
{
}
void OListView::expand(QListViewItem *item)
{
((OListViewItem*)item)->expand();
}
diff --git a/core/pim/osearch/resultitem.cpp b/core/pim/osearch/resultitem.cpp
index f051b12..41c22c0 100644
--- a/core/pim/osearch/resultitem.cpp
+++ b/core/pim/osearch/resultitem.cpp
@@ -1,27 +1,26 @@
//
//
// C++ Implementation: $MODULE$
//
// Description:
//
//
// Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "resultitem.h"
-#include <qmessagebox.h>
ResultItem::ResultItem(OListViewItem* parent)
: OListViewItem(parent)
{
}
ResultItem::~ResultItem()
{
}
diff --git a/core/pim/osearch/searchgroup.cpp b/core/pim/osearch/searchgroup.cpp
index 5377b9f..7a0b5a7 100644
--- a/core/pim/osearch/searchgroup.cpp
+++ b/core/pim/osearch/searchgroup.cpp
@@ -1,43 +1,40 @@
//
//
// C++ Implementation: $MODULE$
//
// Description:
//
//
// Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003
//
// Copyright: See COPYING file that comes with this distribution
//
//
-#include "olistviewitem.h"
#include "searchgroup.h"
#include <opie2/owait.h>
-#include <qobject.h>
-#include <qregexp.h>
#include <qapplication.h>
#ifndef NEW_OWAIT
static OWait *wait = 0;
#endif
SearchGroup::SearchGroup(QListView* parent, QString name)
: OListViewItem(parent, name)
{
_name = name;
loaded = false;
}
SearchGroup::~SearchGroup()
{
}
void SearchGroup::expand()
{
//expanded = true;
if (_lastSearch != _search) clearList();
if (_search.isEmpty()) return;
diff --git a/core/pim/osearch/todoitem.cpp b/core/pim/osearch/todoitem.cpp
index c20f1fd..be780a1 100644
--- a/core/pim/osearch/todoitem.cpp
+++ b/core/pim/osearch/todoitem.cpp
@@ -1,43 +1,42 @@
//
//
// 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 <qpe/resource.h>
#include <qpe/qcopenvelope_qws.h>
-#include <qpixmap.h>
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)");
diff --git a/core/pim/osearch/todosearch.cpp b/core/pim/osearch/todosearch.cpp
index 5042803..cdf3a1c 100644
--- a/core/pim/osearch/todosearch.cpp
+++ b/core/pim/osearch/todosearch.cpp
@@ -1,43 +1,42 @@
//
//
// 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 <qpe/config.h>
-#include <qiconset.h>
#include <qaction.h>
#include <qpopupmenu.h>
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/TodoListSmall" );
setPixmap( 0, is.pixmap( QIconSet::Large, true ) );
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() );